2018-05-17

<clever> jack[m]: thats due to your glibc not being the right version, rather then a missing patchelf
<clever> jack[m]: and all of that has been handled in nixpkgs
<clever> jack[m]: what are you trying to do with that?
<clever> jack[m]: a binary that haskell has compiled? or ghc itself?
<clever> jack[m]: eek!
<clever> aminechikhaoui: buildCommand replaces all default phase logic, so it no longer runs any phases
<clever> aminechikhaoui: you probably want buildPhase instead
<clever> aminechikhaoui: thats what buildCommand does
<clever> ben: i think -u just searched for any derivation with ruby in the .name, and installs it if its newer
<clever> nix only hashes the string inside the symlink, but wont make the target be available
<clever> yeah
<clever> Myrl-saki: probably
<clever> > builtins.removeAttrs { foo = "bar"; } [ "foo" ]
<clever> Myrl-saki: and this runs xen inside qemu inside nix
<clever> and every combination of the above that is possible
<clever> luks or not
<clever> sata, virtio, or nvme
<clever> uefi or legacy
<clever> Myrl-saki: this generates bash scripts that run qemu interactively, to test various hardware configurations
<clever> Myrl-saki: it also allows you to use template-nix instead of template haskell
<clever> Myrl-saki: i have also made a runHaskell variant
<clever> all derivations are actually sets containing a .outPath
<clever> and you just wind up with whatever .outPath was
<clever> if any attribute set contains .outPath, it can be blindly cast to a string
<clever> > "${ { outPath = "not-a-path"; } }"
<clever> but --argstr assumes the value is a string, and saves you the trouble
<clever> so you would be forced to do --arg key '"value"'
<clever> ben: the main difference between --arg and --argstr, is that --arg will try to parse the arg as nix
<clever> so now i can edit nix on a linux machine, and then build darwin binaries
<clever> and the 2nd one forces it to do a darwin build, using my build slaves
<clever> the default.nix accepts 2 strings as arguments
<clever> ben: a recent usage of --arg: `nix-build default.nix -A cardano-sl-wallet-new --argstr gitrev 1234 --argstr system x86_64-darwin`
<clever> ben: and if you dont use -f, it will generate an attribtue set by doing a weird recursive search of ~/.nix-defexpr/
<clever> ben: and if --arg or --argstr is used, it will pass it to each of those 4 functions
<clever> ben: so i could do `nix-env -f foo.nix -iA foo.bar.baz`, and then have it call 4 functions (foo.nix itself, foo, bar, and baz)
<clever> and nixos.hello in an expression does not do that
<clever> when you nix-env -iA nixos.hello, it splits nixos.hello into a list, and then for each element, it will look it up in a set, then test what the type is, and maybe call it with all of --arg, then repeat
<clever> nix-env's -A is also pretty confusing
<clever> yeah
<clever> that 2nd one will overwrite all of foobar
<clever> oh wait no
<clever> you could also { inherit (something) foobar; } // { foobar.somekey = "somevalue"; }
<clever> betaboon: { foobar = something.foobar // { somekey = "somevalue"; }; }
<clever> infinisil: nvidia for ex
<clever> infinisil: that will break the gpu drivers for anything that mesa doesnt support via open-source
<clever> manveru: it does make it a bit hard to tell which one is newer
<clever> manveru: lol
<clever> manveru: nixos also has a way to generate a docker image
<clever> and nixos does that at runtime with /run/opengl-driver/lib, to avoid having to build everything twice
<clever> infinisil: the problem that causes, is that some gpu drivers like nvidia want to swap out the dri files
<clever> LIBGL_DRIVERS_PATH
<clever> symphorien: it does,let me see
<clever> manveru: https://xkcd.com/1988/
<clever> manveru: and why do you need static linking?
<clever> manveru: not sure on that one
<clever> manveru: and how does it fail?
<clever> manveru: can you gist your expression?
<clever> infinisil: looks good for a 64bit app
<clever> infinisil: then its probably set to the same as your shell was when it ran the program
<clever> manveru: zlib already has a .static, as you can see on line 19
<clever> infinisil: is LD_LIBRARY_PATH set right?
<clever> infinisil: run "file" on the binary
<clever> infinisil: is it a 32bit or 64bit program?

2018-05-16

<clever> iqubic: have you tried comparing `pactl list` and `pavucontrol` ?
<clever> dmj`: export NIX_REMOTE=daemon
<clever> that looks more like somebody logging out
<clever> probably unrelated
<clever> lack of activity from other things
<clever> iqubic: any 5 second gaps around the time when it should have finished booting and should be showing a login screen
<clever> iqubic: journalctl
<clever> iqubic: check the things i previously mentioned
<clever> maybe
<clever> pip3000: after it boots, go over `lsmod` and see if you can find anything that looks keyboard, input, or hid related
<clever> pip3000: we will need to identify which kernel module handles it, and add that to boot.initrd.availableKernelModules in your configuration.nix
<clever> pip3000: do you have a usb one on-hand to test that out as well?
<clever> iqubic: yeah, i can wait
<clever> pip3000: usb keyboard?
<clever> iqubic: anything abnormal in the journal for lightdm or `systemd-analyze blame` ?
<clever> kiloreux: have you tried quoting that argument to makeWrapper?
<clever> Dezgeg: some programs just have a for loop to close all unexpected FD's after a fork, and before an execve
<clever> angerman: glibc and system() has a similar problem, system() needs a path to sh to execute things, but sh depends on glibc, currently nixos just assumes you always have a /bin/sh
<clever> angerman: you could also patch it to expect an env var pointing to the path, and then use setup-hooks to add it later
<clever> angerman: oh, but you cant use it to solve a dependency cycle, because the hash your looking for depends on the hash of the thing asking for it
<clever> it is fairly safe, as long as you understand that the path may not exist
<clever> angerman: it takes a string, and discards the context, which is how nix knows the string depends on a derivation
<clever> angerman: builtins.unsafeDiscardStringContext
<clever> angerman: within a nix expression or from the CLI?
<clever> and its non-recursive

2018-05-15

<clever> inabsentia: and boot.loader.grub.useOsProber is grub-only, but your using systemd-boot
<clever> inabsentia: has boot.loader.grub.device been set in the configuration.nix?
<clever> if the attribute name is predictable, then you can try to just eval it
<clever> > hello.meta.description
<clever> sphalerite: system.replaceRuntimeDependencies
<clever> sphalerite: remember that security thing in nixos to replace a dep?
<clever> sphalerite: and use an override to replace the alsaLib attr, and then they rebuild, yeah, thats a bit of an issue
<clever> sphalerite: make a new derivation, that copies the pre-build alsaLib output files, and adds things?
<clever> it will behave as if they had come from different nixpkgs revisions
<clever> samueldr: in general, it would probably have 2 copies of all libs, and have to re-build them natively
<clever> samueldr: you can also cheat some by running the native compiler under qemu (either system or user), but then you loose performance
<clever> samueldr: a random note i left myself for later
<clever> (import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.raspberryPi; }).linuxPackages_rpi.kernel
<clever> i just only ever deploy from 1 machine
<clever> ah
<clever> infinisil: ?
<clever> ah
<clever> joko: what differs in how they reply? can you capture both with tcpdump -w and then compare them in wireshark?
<clever> joko: i havent been able to get any uefi system to actually boot the uefi files that the dhcp serves
<clever> joko: ?
<clever> bebarker: i think if -i cant find a manifest.nix, it will remove everything currently installed
<clever> boomshroom: last i checked its working fine
<clever> ive not tried it on a .drv though
<clever> i know you can do nix-env -i /nix/store/hash-name
<clever> bebarker: -i expects to find a manifest.nix in the profile, that details the contents
<clever> bebarker: --set isnt compatible with -i, you cant mix the 2
<clever> infinisil: new features
<clever> eacameron: and we have a new bot
<clever> > builtins.removeAttrs { foo = 1; bar = 2; } [ "foo" ]
<clever> eacameron: builtins.removeAttrs
<clever> FruitieX: id say thats a pretty big bug in the steam chroot
<clever> FruitieX: did you enable 32bit dri?
<clever> bkchr[m]: apple nix uses that suffix because the filesystem sucks :P
<clever> bkchr[m]: was something copied from a mac with rsync?
<clever> bkchr[m]: are you on a mac?
<clever> FruitieX: what does file say on them, and do those paths exist if you do `steamrun bash` ?
<clever> FruitieX: steamrun should help, try debugging under that
<clever> FruitieX: and there is also the steamrun package, which lets you run things in that chroot
<clever> FruitieX: steam runs under an FHS chroot, that provides files at the right paths
<clever> bkchr[m]: thats normal for a new install, running nix-env -i will fix it
<clever> FruitieX: you need to run patchelf on the binary to fix the ld.so path

2018-05-14

<clever> then tmux will be the first thing in PATH
<clever> nico202: you can also export PATH=$(nix-build '<nixpkgs>' -A tmux)/bin:$PATH
<clever> first i'm hearing of that, but their channel has come up in past conversations
<clever> they also have an irc channel, #worksonarm
<clever> ah
<clever> ?
<clever> which is why its disabled by default
<clever> kreetx: in theory, a bootloader based malware could put your entire OS into a vm, without it noticing, and then do naughty things in the background
<clever> kreetx: its probably accelerated vm extensions in the cpu
<clever> kreetx: your supposed to manage the channel as root when using a multi-user setup
<clever> unlmtd: read it and see if it checks for things like .version?
<clever> i suspect the kernel has to be built in the right mode to even look for that section
<clever> sphalerite: it just replaces the initrd section in the ELF layout
<clever> sphalerite: oh, and reading the wiki closer, it only works on a kernel that already has an initrd baked into it at compile time
<clever> you might be able to modify the linux derivation to also include an uncompressed vmlinux in its output
<clever> nix just makes it tricky to use that
<clever> sphalerite: ive not tried forcing such a thing on the kernel after its built, but i do know that linux has a compile-time option to embed an initrd into it
<clever> kreetx: yeah, it should all be in the nix manual
<clever> you need to manually configure /etc/nix/machines with the sshkey and user/host of a linux build slave (which can be in virtualbox, if you remember to turn it on for builds)
<clever> so it just fails
<clever> but now that darwin is using a multi-user setup, it doesnt have permission to do that
<clever> kreetx: previously, nixops would auto-configure the virtualbox as a buildslave and just work
<clever> dhess: i think you need to restart nix-daemon
<clever> sphalerite: the nixBuild bash function would need to be adjusted to use nix build
<clever> sphalerite: nixos-rebuild internally uses nix-env, so that needs to be fixed first
<clever> sphalerite: ive also wanted that single-line output with nix-shell
<clever> dhess: nixops downloads everything to the deployment host, then re-uploads the build deps to a build slave
<clever> probably both
<clever> yeah
<clever> dhess: and next time it does a nixops deploy or reboot, it will revert the file back to its proper version
<clever> dhess: you need to manually replace the /etc/nix/nix.conf symlink with a file having the same contents, then edit that file to remove the hydra
<clever> sphalerite: it might help if the -o option made an indirect root on the remote machine
<clever> and they might get GC'd during that last step?
<clever> oh, wow, nice
<clever> sphalerite: yeah, but the master would just re-upload things when it starts the next build
<clever> sphalerite: i think ive seen some bugs where the darwin garbage collector cant see all in-use files
<clever> PolarIntersect: how are you attempting to install it?

2018-05-13

<clever> Lisanna: what filesystem are you using?
<clever> Lisanna: about your only option is to wait for GC to finish
<clever> Lisanna: welp, there goes your entire cache of downloaded things :D
<clever> then it starts to actuall delete
<clever> Lisanna: and you wont gain any space until it has either found all the garbage, or hit the max-freed limit
<clever> Lisanna: yeah, it will MOVE all the garbage into /nix/store/trash, as it collects garbage
<clever> the more you try to delete at once, the longer it will take to even give you 1 byte
<clever> after deleting that much, it will stop
<clever> yeah
<clever> so it deletes 1gig at most, rather then everything
<clever> Lisanna: thats why i tend to use nix-collect-garbage --max-freed=1g
<clever> double-check, do you happen to have 2 GC's running at once?
<clever> Lisanna: it may be trash left-over from a previous gc?
<clever> Lisanna: the GC is taking a long time because its running `rm -rf /nix/store/trash`

2018-05-12

<clever> wohoo: if you search nixpkgs for libredirect you can find some examples
<clever> wohoo: i would use libredirect to reconfigure it to save under $HOME
<clever> wohoo: is it more of a service or an application?
<clever> wohoo: which app wants to create what files?
<clever> wohoo: what kind of data?
<clever> it sometimes misleads people into thinking they can .overrideAttrs it
<clever> i avoid putting a version attribute on things, and try to go for a version in a let block
<clever> let me find the algo
<clever> it will differ
<clever> and they differ, so getting a collision on purpose is rather imposible
<clever> Lisanna: the converting between hash(deps) and hash(fixed-output) to storepath is one-way
<clever> Lisanna: i believe fixed-output derivations use a slightly different hashing algo

2018-05-11

<clever> drummeur_: can you gist the output of `mount` and the config that command wrongly generated?
<clever> drummeur_: nixos needs to rewrite the grub config on every config change, so it needs to know where grub is configured to even work
<clever> also in the case of ZFS, you need free space to even delete a file
<clever> elvishjerricco: what if you take the | gpg import off the end, and take off -t?
<clever> anoying, but not as bad as the ssh stuff it did before
<clever> and sometimes that means a pinentry prompt appearing on a laptop i left upstairs
<clever> the remote gpg connects to the xorg that is "local" relative to itself
<clever> elvishjerricco: the remote one
<clever> elvishjerricco: i have my gpg configured to always ask with a gui, even for ssh sessions
<clever> wilornel: nix-build '<nixpkgs>' -A sqlite.dev

2018-05-10

<clever> ah
<clever> Myrl-saki: what was it?
<clever> yeah, its unpatched, it will only work inside steam's FHS
<clever> and file?
<clever> Myrl-saki: ls -lh /home/myrl/.local/share/Steam/ubuntu12_32/steam ; file /home/myrl/.local/share/Steam/ubuntu12_32/steam
<clever> so if you download ghc, it needs a gig of ram
<clever> and thats why i run my own bouncer
<clever> Turion: but the TPM is disabled in your bios
<clever> Turion: yeah, it sounds like the kernel is trying to use the TPM as a high-quality random number source
<clever> Turion: what error are you getting that claims the TPM is at fault?
<clever> Turion: the TPM is used for certain encryption tasks, and has nothing to do with fsck
<clever> :D
<clever> matrix is having another matrix moment, please hold
<clever> Turion: nix-store --optimize just uses hardlinks to merge identical files into eachother
<clever> this mounts an s3fs on bootup
<clever> robstr: oh, and i already have s3fs working without any fancy systemd units
<clever> which leads to scripts only working when ran from a shell
<clever> jD91mZM2: oh, of note, if you try to run a "script" that lacks a #! but it is +x, bash will just run itself on the file
<clever> you can also build a custom livecd, that includes justdoit in the image
<clever> robstr: you must clearly define exactly what you service needs, and not risk maybe getting it because you already installed it, then it fails for others
<clever> robstr: systemd.services.NAME.path = [ pkgs.something ];
<clever> we may need to double-check the docs for store_uri
<clever> see if it still signs things
<clever> the example i linked has this
<clever> binary_cache_secret_key_file = /etc/nix/hydra.iohk.io-1/secret
<clever> yeah
<clever> 2018-05-10 02:46:31 < clever> pingu_: try just deleting the store-uri from your config entirely, and then see what it does
<clever> what does the new hydra.conf say?
<clever> it shouldnt be opening that file
<clever> has hydra-queue-runner restarted since you deployed, what does the new hydra.conf say?
<clever> you must edit the config in configuration.nix and then nixos-rebuild switch
<clever> nixos is going to undo that change every time you reboot
<clever> ah
<clever> which config file are you editing?
<clever> it shouldnt need to run as root
<clever> pingu_: try just deleting the store-uri from your config entirely, and then see what it does
<clever> and not attempting to write to a nar directory
<clever> pingu_: hydra should just be talking to the nix-daemon to import all things into the local store
<clever> pingu_: it sounds like your configuring things wrong
<clever> so base32 is half the size of base16
<clever> kuri0: the binary of the hash, not the hex of the hash
<clever> so it has twice the chars to pick from when compared to hex
<clever> kuri0: base32 means each character is from a set of 32, rather then a set of 16
<clever> pingu_: the first one is how the hydra is configered, the 2nd is how all the clients are configured to use it
<clever> pingu_: ah, then youll probably want to switch to what i linked above
<clever> also, do the .narinfo files have nar: paths pointing to files that exist?
<clever> you can manually add a nix-cache-info
<clever> kuri0: and its base32 rather then base16
<clever> kuri0: something like that
<clever> or manually serve that directory with nginx
<clever> yeah
<clever> pingu_: that would be the store_uri you just pasted
<clever> pingu_: and that static http server is the binary cache
<clever> pingu_: then you need to create a static http server that serves the files in that directory i believe
<clever> pingu_: you set a config flag that uploads the build results elsewhere
<clever> kuri0: one min
<clever> check `ip route` and confirm if the gateway and routes are right, and try to ping the gateway
<clever> sounds more like routing or gateway problems
<clever> and can you ping that dns server?
<clever> if you have 2 connections active, it may stick to the first one that was working
<clever> jD91mZM2: does /etc/resolv.conf update when you connect with wpa_supplicant?
<clever> jD91mZM2: is there any ethernet plugged in while your testing the wifi?
<clever> pingu_: channels can be used, but i dont really bother with them
<clever> pingu_: just add it to the binary caches list in your nix config, and run nix-build against the identical nix expressions, and it will download the pre-built stuff
<clever> pingu_: the hydra website is also a binary cache
<clever> yep
<clever> try without the gitignoreSource and see how bad the rebuilds are?
<clever> yeah
<clever> gitignoreSource does the same, but its acting on the hash of the entire project, not the subdir
<clever> qenuh: and if the contents of the dir havent changed, the path wont change, and it wont trigger a rebuild
<clever> qenuh: cleanSource will hash the directory after cleaning, and base its storepath on that hash
<clever> with the right order of operations enforced
<clever> qenuh: what about running cleanSource on a subdir of gitignoreSource?
<clever> cleanSource doesnt read .gitignore
<clever> so it applies cleansource to the subdir
<clever> you want to wrap the (path+string)
<clever> qenuh: that is why it fails
<clever> qenuh: due to order of operations, that is interting ALL of ./., which includes the non-haskell changes, then appending "haskell-project" to the path
<clever> > let f = x: "foo"; in f "a" + "b"
<clever> > let f = x: "foo"; in x "a" + "b"
<clever> > let f = x: "foo" in x "a" + "b"
<clever> cheater: there is also ${stdenv.shell}
<clever> qenuh: run nix-instantiate on the derivation, then make a change and nix-instantiate again, then nix-diff the 2 .drv's
<clever> qenuh: did you do 2 full builds or 1?, cleanSource will likely cause 1 rebuild because the paths change some