2018-03-24

<clever> i have googled problems before, found a stack overflow, and an acceptable answer, that i had already upvoted....
<clever> lol
<clever> yep
<clever> glib and a number of other packages also do the same thing
<clever> yeah
<clever> and the script you linked, is the list of paths it will guess
<clever> so you must specify the right -I flag to find it
<clever> but, mysql decided to put their headers in include/mysql/mysql.h, and refer to it as #include <mysql.h>
<clever> abathur: so #include <foo.h> will look for include/foo.h, in every buildInput
<clever> abathur: for everything you put into buildInputs, nix will add the include directory to the default -I path
<clever> see what --help calls it
<clever> i think you need configureFlags = [ "--enable_use_mysql=${mysql}/include/mysql" ]; but that doesnt feel 100% right
<clever> and the auto-config in nixpkgs cant auto-figure it out
<clever> it needs to look in ${mysql}/include/mysql
<clever> ah, i see the issue
<clever> yeah
<clever> abathur: and what is the nix expression?
<clever> abathur: run nix-store -q --tree on the .drv file, then search for mysql with /
<clever> its mostly up to whoever wrote the module that defines the option
<clever> thats done by setting nix.nixPath in the nix module, rather then setting the default
<clever> and add options to the module args on line 1
<clever> options.nix.nixPath.default
<clever> and setting it to anything will also wipe the default
<clever> oh, and also, the default value is a bit special
<clever> mkForce will also delete the defaults
<clever> yep
<clever> mkForce again
<clever> the listOf is just a function that gives a merge function, that can join things
<clever> and then 423 takes that final list, and turns it into a string
<clever> so if you set it in 2 files, nixos will join the 2 values
<clever> 338 defines the option as being a listOf strings
<clever> and line 423
<clever> then join that final list into a string, that sets environment.NIX_PATH
<clever> and will concat each list set to it, to form the final option
<clever> that option has a merge function on it
<clever> how are you setting NIX_PATH?

2018-03-23

<clever> you have to use mkForce to change it
<clever> krey: this module always sets it to that path, and is conflicting
<clever> can you pastebin that error?
<clever> krey: how is nixpkgs being loaded?
<clever> i think it needs 1 more };
<clever> i think
<clever> self: super: { haskellPackages = super.haskellPackages.override { overrides = hsself: hssuper: { hlibsass = super.haskell.lib.dontCheck hssuper.hlibsass; }; };
<clever> the haskell packages basically need their own overlays
<clever> fresheyeball: you can still use overlays with what i typed
<clever> fresheyeball: try the way i just typed
<clever> then you also dont need the //
<clever> `haskellPackages.override { overrides = self: super: { foo = super.override ...; }; }` will modify the haskellPackages to accept the override internally
<clever> that wont be available to the other haskell packages, only outside users
<clever> krey: hmm, they match up
<clever> krey: compare `env | grep NIX` under both `sudo -i` and `sudo su`
<clever> ottidmes: i prefer `sudo -i` over `sudo su`
<clever> aminechikhaoui: the simplest way to run the right one is: phases="configurePhase" genericBuild
<clever> aminechikhaoui: there is botn a configurePhase function, and a $configurePhase string
<clever> elvishjerricco: yeah, force reboot causes it to use the boot flag
<clever> zybell_: and if a guest has its own store, and is using path A, the host probably wont let you GC the host copy of A
<clever> zybell_: looks like nix doesnt directly check for things like chroots
<clever> zybell_: not sure
<clever> tnks: yep
<clever> but the nix tools themselves may break some
<clever> it should be safe to use the stuff in the store from inside docker
<clever> the roots in /tmp that nix-shell/nix-build generate are more likely to break
<clever> just with different PID's
<clever> the processes from the docker container are still visible
<clever> proc has a lot of magic in it
<clever> and /proc/PID/cwd for the working directory!
<clever> and /proc/PID/maps for the mapped files
<clever> and /proc/PID/fd to check the open files in every process
<clever> it uses /proc/PID/environ to peek into the env of every process on the machine
<clever> since they are in $PATH, they are "in use"
<clever> tnks: all environment variables are roots
<clever> zybell_: the webchat always uses his real ip in the ident field
<clever> s2mitrov: depends on if your defining your own service or not
<clever> s2mitrov: and services. is to configure modules, that will probably set one of the previous 2
<clever> s2mitrov: systemd.service and systemd.user.service is to define systemd services, either globally or per-user

2018-03-21

<clever> dhess: nix 2.0 copies store paths around as std::string's, so you need enough ram+swap to hold the biggest storepath
<clever> but the root device is not going to work on a normal pi, it was just to make nixos shut up and build
<clever> WhittlesJr: this is an example deployment i made, which builds all of nixos on a raspberry pi
<clever> WhittlesJr: you either need to setup cross-compiling of nixos (tricky), or just set nixpkgs.system = "aarch64-linux"; i think, and it will build on the pi's
<clever> ahhh, i see
<clever> WhittlesJr: then nixops will only ever use that revision, and ignore what the host has
<clever> WhittlesJr: i prefer doing `nixops modify -d name deployment.nix -I nixpkgs=https://github.com/nixos/nixpkgs/archive/rev.tar.gz`
<clever> sphalerite: i think domenkozar got some of that stuff working
<clever> gchristensen: does `nix show-derivation` help?
<clever> yeah, ~/.config/nixpkgs/config.nix has replaced it
<clever> nioncode: thats how nearly everything else in nixpkgs works
<clever> it already does that with a large number of pre-built things in nixpkgs
<clever> nix can automate that patchelf'ing
<clever> nioncode: and you cant just patchelf those tools?
<clever> nioncode: is there a reason you need an FHS env?, and a normal nix-shell wont do?
<clever> nioncode: can you gist your expression?
<clever> nioncode: targetPkgs
<clever> nioncode: it has to be in the inputs for the fhs env
<clever> kiloreux: yeah, same way as installPhase
<clever> nioncode: -p has priority, it will only load bashInteractive, and nothing else
<clever> kiloreux: then your overrides are applying to the version with only a buildCommand
<clever> kiloreux: run `nix repl '<nixpkgs>'` and then try to eval chromium.buildCommand and chromium.installPhase
<clever> inspect it with nix repl to verify which one you are trying to override
<clever> and on my end, i get this derivation at pkgs.chromium
<clever> buildCommand disables all phases
<clever> kiloreux: oh
<clever> on my end it does
<clever> you dont need rec on this
<clever> kiloreux: are you using .overrideAttrs (drv: { ... ?
<clever> kiloreux: the drv attribute that overrideAttrs passes you, has the original installPhase
<clever> so you need to installPhase = drv.installPhase + "\nyour additions";
<clever> which has the side effect of breaking pre/post install hooks
<clever> chromium overrode the installPhase
<clever> kiloreux: oh, and i see your problem
<clever> kiloreux: chromium is a weird package, because the attribute in pkgs is already a wrapper
<clever> kiloreux: with overrideAttrs
<clever> but once built, you can copy it to a less capable machine
<clever> it needs nix 2.0 fully working, and i think namespaces, to build it
<clever> symphorien: so a machine with working 2.0 can build a /home/clever/nix/store that is temporarily stored at /home/symphorien/rootfs/home/clever/nix/store
<clever> symphorien: that mixes nix 2.0's ability to work on a store where / isnt at /, and the vars you mentioned, to make a store that isnt in /nix/store/
<clever> symphorien: i have a method of building that nix without a proot
<clever> BlessJah: nix-env doesnt use NIX_PATH
<clever> BlessJah: yeah, the default path can only find channels on root
<clever> justanotheruser: no, the buildInputs attribute has to be a list of inputs
<clever> justanotheruser: put both into the buildInputs of a derivation

2018-03-20

<clever> Shados: builtins.compareVersions
<clever> Shados: there is
<clever> amd/root 30883325 300264 30583061 1% /
<clever> Filesystem Inodes IUsed IFree IUse% Mounted on
<clever> [clever@amd-nixos:~]$ df -i /
<clever> tnks: it also sometimes leaves stray .lock files in /nix/store/ and failed outputs in the store
<clever> i also have a systemd timer that does a gc every day at midnight
<clever> thats why i lack invalid ones
<clever> i just did a gc above
<clever> tnks: i'm up to 218 of such links, that are all valid
<clever> tnks: yeah
<clever> but it will still clean up the auto dir first
<clever> tnks: this stops the GC after deleting 1 byte of garbage
<clever> removing stale link from '/nix/var/nix/gcroots/auto/m10fzld4yn1qz2j0cm7pc5r5lvj2cggm' to '/tmp/nixos-rebuild.yDMmHJ/nix.drv'
<clever> warning: unknown setting 'build-extra-platforms'
<clever> finding garbage collector roots...
<clever> [clever@amd-nixos:~/iohk/daedalus]$ nix-collect-garbage --max-freed 1
<clever> thats the very first step it does
<clever> tnks: any form of garbage collection
<clever> infact, just an ls -ltrh on auto reveals this
<clever> lrwxrwxrwx 1 root root 29 Mar 20 12:58 mx08rprk330vx7r8xzb033wgb6k3fc1m -> /tmp/nix-build-30471-0/result
<clever> tnks: you can just run the nix-shell then ls -ltrh the auto dir while the shell is open
<clever> tnks: nix-shell keeps similar links in /tmp, which it will clean up
<clever> tnks: oh, but i think some of gcroots/auto points to stuff nix-shell manages
<clever> tnks: gcroots/auto is for things like the result symlinks
<clever> dtz: it also scans env vars, and several others
<clever> and `-c bash -x` maybe
<clever> thoughtpolice: what about `nix run -f '<nixpkgs>' hello -c bash` ?
<clever> though yeah, changing SHELL wont fix that
<clever> thoughtpolice: your .profile and such may be broken
<clever> thoughtpolice: try again with `export SHELL=/run/current-system/sw/bin/bash` ?
<clever> thoughtpolice: what shell are you using?
<clever> but you can check the man page for efibootmgr, and try playing with it some more
<clever> not sure then
<clever> dahirsch: is this from inside the install or from an installation cd?
<clever> dahirsch: depends on the bios, ive seen one that just ignores the config entirely, and only ever boots the windows path
<clever> catern: i think builtins.toPath does that already
<clever> that feels like something easier to manage
<clever> the cross stuff would be simpler, it can be a glibc based ghc, that targets musl based executables
<clever> kuznero: i dont think so, but Sonarpulse might know more about how to flip that switch
<clever> thoughtpolice: ah, i hadnt figured out the prefixes with run and had been using `nix run -f '<nixpkgs>' hello`
<clever> thoughtpolice: it still obeys NIX_PATH and -I as always
<clever> dahirsch: in the nixos-rebuild man page is --install-bootloader
<clever> dahirsch: one sec
<clever> dahirsch: i did this install over a legacy netboot, so the efi services where not available during install
<clever> dahirsch: boot.loader.grub.efiInstallAsRemovable = true;
<clever> dahirsch: that sounds odd, what does efibootmgr say?
<clever> dahirsch: that config looks like it should work, what is failing?
<clever> dahirsch: *waves*
<clever> catern: pkgs.path is the path to the nixpkgs that pkgs came from
<clever> infinisil: nix strips the trailing / off after each append
<clever> infinisil: and ./. + "/" + "c/d" will fail horridly
<clever> also, "${./.}" is very different from (toString ./.)
<clever> ./. + "/" == ./.
<clever> paths are a bit weird though
<clever> boomshroom: nixpkgs uses that, to build the gcc specified in nixpkgs, so the version can still easily upgrade
<clever> boomshroom: this is the path to the pre-build gcc
<clever> boomshroom: this file, and a tarball refered to nearby, give you a "complete" gcc toolchain: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh
<clever> boomshroom: go hard, bootstrap gcc as well, its easy!
<clever> catern: it will also apply a filterSource over the whole tree, to delete anything git isnt aware of
<clever> catern: there is an open bug with builtins.fetchGit, it will report a hash of all 0's if there are any un-commited changes
<clever> not sure how to do that on darwin
<clever> nix-shell already points those to clang
<clever> kthnnlg: patch the build scripts to obey $CC and $CXX
<clever> catern: all it does is impurely run some git commands at eval time
<clever> catern: builtins.fetchGit ./repo/submodule
<clever> catern: unquoted, and ./
<clever> catern: i think you can call fetchGit on a submodule path, if the .git is intact
<clever> catern: yeah
<clever> catern: lib.commitIdFromGitRepo for any nix version
<clever> coconnor: builtins.fetchGit for 2.0
<clever> coconnor: where was linger set again?, ive noticed systemd killing my screen sessions
<clever> there is also an entire cpu socket just missing
<clever> sphalerite: plenty of room in mine, *runs off to get a pic*
<clever> gchristensen: i have the android pushbullet app, and i can send photos to my browser, which has the chrome extension
<clever> so you can inspect the contents, without unlocking or disrupting airflow
<clever> but right under it, is a second clear plastic sidepanel, that can be locked
<clever> the side panel isnt locked
<clever> Dezgeg: the plastic panel on the inside would make a good fishtank, lol
<clever> sphalerite: the badge calls them ultra 25's
<clever> Dezgeg: but the journal needs speed
<clever> Dezgeg: for 90% of the data, it is fixed
<clever> it has no userland tools to deal with such situations
<clever> xfs just lacks the ability to recover such a journal
<clever> and the endianess was flipped from my x86 machines
<clever> biggest issue i had, is that it just ceaseed booting one day
<clever> sphalerite: i ran gentoo on sparc a few years ago, and i still have the hardware
<clever> MoreTea: try [ (import ./default.nix) ];
<clever> YegorTimoshenko[: i think NIX_CONF_DIR can change where it looks for nix.conf
<clever> srid: the latest bluetooth stuff has lost its alsa support, and you must run a pulseaudio to get audio
<clever> oh, lovely, now pulseaudio doesnt work in chrome
<clever> i think i'm even getting more tabs per process
<clever> Dezgeg: it somehow feels like chrome started faster
<clever> Dezgeg: neatly 2000 of them are shm handles
<clever> Dezgeg: yikes!
<clever> 4753
<clever> [root@amd-nixos:~]# ls -l /proc/445/fd/ | wc -l
<clever> but its never affected the master process before
<clever> i have had problems in the past, that i tracked down to a single renderer process opening so many sockets that it commited suicide
<clever> i set the limit to 64k,and chrome lowered itself to 8k
<clever> Max open files 8192 65535 files
<clever> Limit Soft Limit Hard Limit Units
<clever> ive been increasing it to 4096 for months, for just chrome
<clever> security.pam.loginLimits time...
<clever> gchristensen: and now chrome refuses to launch
<clever> #6 0x556519b757a5 [17670:17703:0320/101623.355468:ERROR:socket_posix.cc(91)] CreatePlatformSocket() returned an error, errno=24: Too many open files (24)
<clever> and it is now 10am
<clever> according to datadog, it froze at 23:40
<clever> 7449 store paths deleted, 7971.25 MiB freed
<clever> unleash the garbage man!
<clever> arp was up, but sshd hung mid way thru auth
<clever> this is likely also why it stopped responding to begin with
<clever> and it boots!
<clever> gchristensen: now that i know the issue, i can just manually destroy a few snapshots from the initrd, and reboot
<clever> but the way nixos boots is a bit special
<clever> gchristensen: id expect it to fail in a lot of places, not hang hard
<clever> it always hangs when mounting /
<clever> if you have 0 bytes free, you cant boot!
<clever> found a critical problem with zfs on nixos
<clever> ottidmes: pid 1 will adopt any orphaned processes, which makes it harder to see what started them
<clever> yeah, that sounds likely
<clever> pid 1?
<clever> ottidmes: what is the parent of firefox-wrapped?
<clever> ottidmes: check `ps -eH x` while firefox is running, and follow the tree up
<clever> or wrap it with a bash script that redirs to null
<clever> the only way to not do that, is to run it from a terminal
<clever> i believe it would inherit the stdio of the window manager, and wind up in display-manager.service's logs anyways
<clever> cransom: i use zfs for my backend
<clever> lol

2018-03-19

<clever> and also modern browsers just not even showing one
<clever> noobs that cant see the loading bar in a browser
<clever> infinisil: thats likely what they where thinking of :P
<clever> and tell you to not to f5 the thing, and that its actually working :P
<clever> and the parent frame would re-assemble it
<clever> as each tag came in, the browser would eval the "inline javascript"
<clever> then relayed that out of an iframe with .sendMessage
<clever> so they broke the javascript into 1024 byte strings, and did <script>s("....");</script>
<clever> the core of the game itself was 6mb, and rather then use the progress bar built into the browser, they wanted to re-theme it
<clever> Dezgeg: a game i used to play implemented its loading ui as javascript inside javascript
<clever> the minification also makes `grep -r` rather unusable
<clever> Dezgeg: i think its a map file to allow you to undo the minification effects on a backtrace
<clever> Dezgeg: yeah
<clever> much more readable
<clever> jq time!
<clever> actually, i think this is json, not javascript
<clever> that hash? appears in 2 spots in the file
<clever> +ER //\n// webpack/bootstrap c6330756841e9ef425bb","\"use strict\";\n\nexports.__
<clever> -ER //\n// webpack/bootstrap 3ec9a91694dd54b7992c","\"use strict\";\n\nexports.__
<clever> gchristensen: oh, fold sounds neat
<clever> dont see that in the man page
<clever> Size: 8551702 Blocks: 18497 IO Block: 131072 regular file
<clever> Size: 8551702 Blocks: 18497 IO Block: 131072 regular file
<clever> yeah, javascript
<clever> the files differ in content but have identical length
<clever> 2 massive blobs, 8mb each
<clever> gchristensen: what would you use?
<clever> gchristensen: i'm trying to nix-build --repeat 1 something, and ive found a file that differs, but it doesnt have a single \n in it, so all the normal diff utils just fail horribly
<clever> ah
<clever> manveru: any reason you cant use fetchFromGitHub?
<clever> manveru: what is fetchGit doing differently?
<clever> so it has to download the 32bit versions of everything
<clever> by default, wine is 32bit only