2019-04-05

<clever> result/lib/R/bin/exec/R: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped
<clever> ah, the one you showed above
<clever> mekeor: oh, R is just a bash script, we want to read that, and run strings on something else
<clever> mekeor: looking for the path of which, how did R get that path to pass it to execve

2019-04-04

<clever> mekeor: what if you just run `hexdump -C` on the binary, and then manually search thru it for a path, it may be one character on every 2nd or 4th byte
<clever> mekeor: wait, it is using the generated file, strace confirmed that
<clever> mekeor: then either its encoding things very weirdly, or its not using the generated file
<clever> mekeor: or `-e b`
<clever> mekeor: what about `strings -e l exec/R | grep which` ?
<clever> mekeor: i suspect R is encoding the paths strangely, so nix cant properly detect the runtime deps
<clever> mekeor: oh, if you run `strings` on the compiled binary, does the path to which appear?
<clever> mekeor: the runtime closure is a subset of the buildinputs, based on the paths that persist within $out
<clever> ar1a: you could also try asking domenkozar next time he is on, but i think he's sleeping right now
<clever> all revs in that list will have coverage on the binary cache, so you wont need to spend an hour building ghc
<clever> ar1a: and select a rev that has the ghc you want
<clever> ar1a: you would need to change the rev in nixpkgs-src.json to match one from a URL like https://channels.nix.gsc.io/nixos-unstable/history
<clever> ar1a: hie pins the version of nixpkgs, so nothing you do to your channels will have any impact on it
<clever> mekeor: yeah, it will hash everything in /nix/store/
<clever> ar1a: would be simpler to just point nix-build to the right rev, then to try and do a rollback
<clever> mekeor: what about the output of `nix-store --verify --check-contents` ?
<clever> mekeor: yeah, looks like the generation worked perfectly
<clever> mekeor: if you repeat the test from the issue, under `strace -e execve -f`, what does it show being ran?
<clever> mekeor: sounds like it got things right on its own
<clever> mekeor: i think configure needs a --flag to set the which path, but it may also use the WHICH env var at build time
<clever> mekeor: and if you read the configure script, what does it do?
<clever> mekeor: that will replace it with the env var WHICH, but it doesnt set that env var
<clever> ## hopefully configure found [/usr]/bin/which
<clever> mekeor: the buildInputs are only available at build-time, and something during the build has to put their paths into the build product
<clever> mekeor: where in that file is it going to replace @WHICH@ ?
<clever> mekeor: can you pastebin the nix expression?
<clever> mekeor: nix-shell -A foo, when in the root of nixpkgs
<clever> mekeor: run `configurePhase` under nix-shell
<clever> that command will open its nix file in an editor
<clever> kalbasit: nix edit nixpkgs.pet
<clever> as long as you havent destroyed the boot chain
<clever> warbo: so even if you cant reach the power button, the old os will resume shortly
<clever> warbo: of note, my kexec image is configured to reboot itself 5 minutes before the end of the hour
<clever> warbo: so nixos will just forcibly hijack the cpu, and assume full control of the box, then run entirely from ram
<clever> warbo: basically, this will create the same kernel+initrd as the rescue setup, but instead of loading it with grub, it loads it with kexec
<clever> warbo: for that kind of crazy idea, kexec also works
<clever> or if you want to keep it around later, for rescue purposes
<clever> warbo: its mainly just a second option, to save you from having to find an unused usb stick
<clever> warbo: that will basically shove the entire liveusb (~400mb in size) into /boot, and give it a grub option
<clever> warbo: this is an alternative option to using a live usb
<clever> warbo: one min
<clever> warbo: but line 440 looks like its only for block devs, it will write the major/minor# to a magic /sys entry, then the kernel takes over resuming
<clever> warbo: i think the kernel cmdline part only works for proper block devices, this option adds stuff to the initrd for you
<clever> warbo: wait, the description mentions file...
<clever> warbo: https://nixos.org/nixos/options.html#boot.resume is the option for non-file swap
<clever> warbo: offset alone wont work for ext4, it would be a list of offset+size pairs
<clever> warbo: the 2nd requires mounting the fs (probably read-only), and running a special util against the swap file
<clever> warbo: the 1st only works with swap parititions, and you specifiy the blockdev on the kernel cmdline
<clever> warbo: ah yeah, there are 2 ways to resume from hibernation
<clever> d10n-work: what does `nix-env -q | grep git` return?
<clever> wolfman154: yes
<clever> warbo: but changing the size of a swap file requires turning it off first, which requires flushing it all back into ram
<clever> mabel: just read the generated makefile and see where its trying to put the files, and how it downloads them
<clever> mabel: if they exist, make wont try to "make" them
<clever> mabel: find out where its trying to put the files, and manually copy them there before the buildPhase
<clever> eacameron: when you run `alsamixer -c 0` is it muted?
<clever> eacameron: when you run pavucontrol, is the app listed under playback?
<clever> and its only used to auto-mount things in .zfs/snapshots
<clever> gchristensen: and nixos uses that to solve the issue
<clever> gchristensen: zfs has already been patched to accept a path to something
<clever> gchristensen: and nixos's /bin/sh has a default PATH=/path-not-set, so it cant find mount
<clever> gchristensen: thats also why do_mount is missing, and zfs has to execute /bin/sh -c "mount ..." just to auto-mount things, lol
<clever> gchristensen: of note, linux has to whitelist symbols that can be used by "unfree" software, and sometimes they can simply forget to whitelist something
<clever> ajs124: ah yeah, i think thats fairly different
<clever> ajs124: no idea what repo is
<clever> eacameron: is pulseaudio enabled?
<clever> because gclient is fighting the nix sandbox constantly, and every test takes 3 hours to run
<clever> basically, i'm writing gclient2nix
<clever> gchristensen: can you guess what i'm implementing?
<clever> gchristensen: still need to fetchgit all of chromium though...
<clever> gchristensen: now i dont have to deal with git!
<clever> > lib.strings.hasPrefix
<clever> gchristensen: is there a simple way to check if a given string starts with another?...
<clever> gchristensen: now i get to fight the git protocol!
<clever> fatal: '538a5023af' is not a commit and a branch 'fetchgit' cannot be created from it
<clever> ar1a: nix-collect-garbage
<clever> thats one massive GC!
<clever> 37844 store paths deleted, 245173.88 MiB freed

2019-04-03

<clever> samueldr: so we where both right!
<clever> samueldr: ah, that explains why i could see extra pins on my galaxy s3
<clever> wolfman154: yep
<clever> samueldr: so the biggest question, if MHL can do hdmi over a single pair, why couldnt apple do it over a single pair? lol
<clever> wolfman154: all window manager stuff has to be done in configuration.nix
<clever> and apple didnt bother with that, despite having a pair for usb
<clever> and MHL compatible TV's would do that for you
<clever> so the adapter expands the 1 pair to 4 pairs
<clever> ahh
<clever> and thats only one twisted pair, hdmi needs 4?
<clever> i thought, the wiki diagram implies otherwise
<clever> its basically hdmi + usb, in the same connector
<clever> ajs124: MHL is just putting more pins into the connector
<clever> so now you get to enjoy h264 compression artifacts on your website text, and your paying battery life to both encode and decode the entire screen as h264
<clever> samueldr: then hardware-decode it and spit it out hdmi
<clever> samueldr: ive heard horror stories about how the apple lightning port doesnt have enough pins to properly do hdmi, so they have to h264 encode the screen, and stream it over usb, to what is basically a raspberry pi in dongle form
<clever> eyjhb: `(import <unstable> {}).hello`
<clever> you can refer to every channel by its name, in any nix file
<clever> <unstable>
<clever> eyjhb: --add takes both a url and a name
<clever> eyjhb: `nix-channel --add https://nixos.org/channels/nixos-unstable unstable`
<clever> eyjhb: you may be better off adding a 2nd channel for unstable, and then using that in the nix file
<clever> betaboon: -I can also accept paths to local directories
<clever> eyjhb: why does the overlay need a tar.gz?
<clever> -I does need a .tar.xz file, nix-channel doesnt
<clever> eyjhb: nix-channel will add /nixexprs.tar.xz to the url automatically
<clever> over7head: configuration.nix
<clever> eyjhb: are you building something custom, or something already in nixpkgs?
<clever> eyjhb: its trying to create a cache in $HOME, but nix doesnt allow $HOME access
<clever> over7head: thats just a single string in configuration.nix
<clever> so nixos's /boot/ never becomes the "real /boot"
<clever> if you set boot.loader.grub.device = "nodev"; then grub wont update the MBR
<clever> samueldr: gentoo had its own /boot/, and it would source the nixos grub.cfg from the nixos /boot/
<clever> samueldr: when i did similiar years ago, i just made nixos's /boot/ not the real boot
<clever> so i can dual-boot once in a blue moon
<clever> over7head: https://gist.github.com/cleverca22/d378ea064720f059e742730d2296b2da lines 17-24 add winblows to my grub config
<clever> over7head: you can define the other OS's in configuration.nix
<clever> over7head: systemd.services.dhcpcd.wantedBy = lib.mkForce []; in configuration.nix will stop it from running on bootup i believe
<clever> which is why you need a custom package that contains the kernel+modules, and jam it into boot.kernelModules
<clever> over7head: any changes you want to do, must be defined in a nix file, and then built normally
<clever> over7head: if you modify anything in /nix/store, nix will treat it as corrupt and want to repair it
<clever> over7head: you could just do the ugly thing, and run insmod on the module
<clever> over7head: since your building your own kernel, you could just bake in the things you need, and just not use modules
<clever> betaboon: you would need a custom package, that contains the kernel and modules, and then jam that into boot.kernelModules
<clever> over7head: that directory will be read-only
<clever> over7head: nixos expects all modules to be in /run/booted-system/kernel-modules
<clever> over7head: could be the gpu drivers and/or xorg
<clever> over7head: slim is pretty slim, it should be near instant
<clever> over7head: which login manager are you using?
<clever> kumikumi: but it wont be getting new updates
<clever> kumikumi: somewhat, its will be receiving backports to fix failures, until its deemed stable
<clever> therealwaphire[m: note that its technically not a stable channnel yet, so its basically the same as nixos-unstable
<clever> kumikumi: is it listed in this directory?
<clever> ls ~/.nix-defexpr/channels_root/nixos/nixos/modules/services/x11/desktop-managers/
<clever> linarcx: you might be able to remove it by making a package override to set xterm = null;
<clever> linarcx: the xterm package is only 1.2mb in size, why bother?
<clever> linarcx: why do you want it gone?
<clever> linarcx: xterm will always be installed when enabling graphics, xterm.enable=false; just removes it from the list of display/window managers
<clever> xok: it should work in your normal ~/.ssh/config file
<clever> xok: youll want to look into something like the ssh keep-alives and tcp keep-alive options
<clever> xok: so if your router has a tendency to kill idle ssh connections, that will be a problem
<clever> xok: all it does is run sshfs with the right params
<clever> ah
<clever> betaboon: did you try a search for grub on https://nixos.org/nixos/options.html#grub ?

2019-04-02

<clever> mabel: your welcome
<clever> and if make is recursively calling make on more dirs, those 7 jobs could be very spammy
<clever> `make -j8` will wait for the other 7 jobs to finish upon failure of one
<clever> then it will stop immediately after failure
<clever> mabel: simplest thing is to enableParallelBuilding = false;
<clever> mabel: this is the main reason you had trouble finding it
<clever> make[2]: *** Waiting for unfinished jobs....
<clever> mabel: line 2651
<clever> mabel: can you pastebin the entire log?
<clever> mabel: anything above that?
<clever> Thra11: builtins.toJSON will preserve most of the data
<clever> pie__: bbl
<clever> pie__: i think you probably do want callPackage
<clever> mostly
<clever> pie__: but then its difficult to get non-plugin things like stdenv
<clever> pie__: you could use callPackageWith to create a new scope that contains nothing else
<clever> slabity: i'm currently debugging a event loop bug in the core of electron
<clever> slabity: i already do that on a daily basis
<clever> gchristensen: making progress on packaging electron, and damn does it ever take forever to even fetch the sources
<clever> which can sometimes delete roots you did want
<clever> you have to delete gc roots via -d or --delete-older-than
<clever> nix-env adds GC roots, so you cant gc those versions
<clever> nix-env will keep every broken version around for months (to years), incase you want to perform rollbacks
<clever> genesis: just nix-build if you want to test things
<clever> genesis: and i never use nix-env when testing
<clever> genesis: hence, the config.nix
<clever> but both have the downside that its temporarily, and nix-env -u will undo your changes
<clever> nix-env -E can also do it
<clever> gchristensen: see how that will work, but also how ugly it is!
<clever> but, you could abuse that, nix-build '<nixpkgs>' -A hello.override --arg enableGui true
<clever> gchristensen: for non-function things, it wont do much
<clever> and so on
<clever> what about .a.b or (a { inherit foo; }).b
<clever> then it will check if .a acepts foo
<clever> then it will first check if foo.nix's top-level value accepts foo
<clever> if you nix-build foo.nix -A a.b.c --argstr foo bar
<clever> gchristensen: --arg interacts mainly with -A
<clever> genesis: your best off using config.nix and overrides
<clever> gchristensen: that would likely pass it to nixpkgs, not the package itself

2019-04-01

<clever> pie__: is the "compiled" copy of that script in the nix store?
<clever> pie__: is that template build at compile-time or runtime?
<clever> ah
<clever> pie__: /bin/bash shouldnt exist on nixos
<clever> pie__: try PATH directly then
<clever> pie__: add bashInteractive to the buildInputs?
<clever> pie__: any time you run `bash` inside nix-shell, it will fail
<clever> pie__: that sounds likely
<clever> and then the 2nd nix-shell obeys, that
<clever> nix-shell nesting fails, because nix-shell adds the non-interactive bash to PATH
<clever> pie__: the wrong one could be in $PATH
<clever> pkgs.bash vs pkgs.bashInteractive
<clever> das-g[m]: that happens when you run a non-interactive bash
<clever> CMCDragonkai: one of the new string context things may allow it

2019-03-31

<clever> ahh
<clever> worldofpeace: ah, maybe its been improved since i last saw the weirdness
<clever> ,locate bin/hello
<clever> and that doesnt seem to be anywhere obvious
<clever> the bot has a weird syntax
<clever> ,locate bin locale-gen
<clever> mabel: cmake is pretty simple, the harder part is knowing enough c/c++ to re-assemble things
<clever> mabel: just rewrite the cmake file!
<clever> mabel: thats very anti-nix!
<clever> elvishjerricco: i think it will only show syscalls related to executing things
<clever> elvishjerricco: execsnoop shows you what was ran, then try manually running the same thing in a terminal
<clever> opensnoop is the other pre-made tool for it
<clever> no args needed
<clever> elvishjerricco: just run execsnoop as root, thats enough for this debugging
<clever> it got moved to conform to the XDG? standard
<clever> rotaerk: ~/.config/nixpkgs/config.nix is the new path and has priority
<clever> rotaerk: and does either override the version of the package in question?
<clever> rotaerk: does ~/.nixpkgs/config.nix or ~/.config/nixpkgs/config.nix exist?
<clever> rotaerk: yeah, only root has a channel, and the channel is called nixos, so both users should agree, baring overrides
<clever> rotaerk: i prefer using gist though
<clever> rotaerk: as a non-root user, `ls -l ~/.nix-defexpr/channels*/*` into a pastebin
<clever> rotaerk: nix-env's versions depend on when you last did nix-channel --update
<clever> rotaerk: nixos-rebuild will never affect nix-env
<clever> rotaerk: do you still have free space on /?
<clever> rotaerk: you need to nix-collect-garbage some profiles (-d or --delete-older-than) to stop nixos-rebuild from copying them back

2019-03-30

<clever> Aleksejs: double-check it in `mount`
<clever> Aleksejs: is /boot/ correctly mounted?
<clever> monokrome: gcc is a bash script, that will forcibly add those flags when calling the real gcc
<clever> and yes, it is in the path
<clever> -isystem /nix/store/3fhfmzlj2w31brqdb6wnp96kjds2s8zv-libXext-1.3.3-dev/include
<clever> monokrome: what args did you run nix-shell with?
<clever> monokrome: echo $NIX_CFLAGS_COMPILE
<clever> monokrome: i can see a CXX here
<clever> clang++
<clever> $ echo $CXX
<clever> $ nix-shell -E 'with import <nixpkgs>{}; clangStdenv.mkDerivation { name = "name"; }'
<clever> monokrome: then it probably isnt obeying $CC
<clever> and then you get clang instead of gcc
<clever> just clangStdenv.mkDerivation
<clever> monokrome: and clang on line 6 probably wont work right, you probably clangStdenv
<clever> monokrome: just xorg.libXext should get .dev for you
<clever> /nix/store/m50nq82b5w5wc4c0r3fs47dsrrmkh0gp-libXext-1.3.3-dev/include/X11/extensions/Xge.h
<clever> ,locate Xge.h
<clever> you may also benefit from building zfs impurely, just inspect it
<clever> when building the zfs modules
<clever> a special CONFIG_ may need to be set
<clever> not sure that will help any with kernels
<clever> but its not clear if that helps any
<clever> gchristensen: 95 is ENOTSUP
<clever> 1230: 94000000 bl 0 <preempt_schedule_notrace>
<clever> 11dc: 94000000 bl 0 <__set_error>
<clever> 11cc: 52800be3 mov w3, #0x5f // #95
<clever> gchristensen: i think i would need a debug build to get more info, the compiler can add line number<->addr mappings, that greatly simplify this
<clever> gchristensen: of note, __vdev_disk_physio is static, so the compiler might inline it
<clever> ioctl will then do some calls and more switch
<clever> and looking back at the source, the write and read blocks, simply set some flags, no function calls
<clever> that puts the first preempt_schedule_notrace within the c80 bock
<clever> ea4: 94000000 bl 0 <preempt_schedule_notrace>
<clever> and 1148 is a 3rd
<clever> c80 is another
<clever> offset b28 is one of the case sections
<clever> and the part after those 3 b.eq is the default:, confirmed via the set_error
<clever> gchristensen: i think the first 3 b.eq opcodes are the case block
<clever> *looks*
<clever> gchristensen: what are you trying to get out of objdump?

2019-03-29

<clever> gchristensen: nice
<clever> martyet-o: shared hosting, each directory on your server runs php files as a diff user
<clever> martyet-o: each with its own config
<clever> martyet-o: php-fpm lets you configure multiple pools of workers
<clever> bemeurer: i messed up partitioning my laptop, made a 40mb swap, rather then a 40gig swap
<clever> bemeurer: suspend to ram works, suspend to disk doesnt
<clever> laalf: i simply dont reboot :P
<clever> laalf: correct, zfs looses the cache at shutdown, its more of a swap for the in-ram cache
<clever> gchristensen: when using supported kernel versions :P
<clever> laalf: zfs on linux is trivial with nixos
<clever> laalf: ahh, ive never delt with that before, and i use zfs now not lvm
<clever> laalf: which link?
<clever> laalf: caching issue?
<clever> laalf: yep
<clever> yes
<clever> ghostyy: so such hacks arent needed anymore
<clever> ghostyy: nixos now saves the passphrase to a file on a tmpfs, and uses it for several devices
<clever> ,locate gclient

2019-03-28

<clever> ,locate bin service