2017-08-07
15:26
<
clever >
nwuensche: and what command fails with an error?
15:23
<
clever >
nwuensche: what does "ping cache.nixos.org" say?
15:17
<
clever >
nwuensche: but if curl fails the download, xz gets a 0 byte input
15:17
<
clever >
nwuensche: nix will pipe curl directly into xz to uncompress the nar.xz's
15:04
<
clever >
nwuensche: and what is in /etc/resolv.conf
13:41
<
clever >
for example, pkgs.ncdu just becomes /nix/store/<hash>-ncdu-1.2.3
13:41
<
clever >
derivations turn into directories automatically
13:37
<
clever >
joehh: if <boolean> then pkgs.fetchgit { ... } else ./localdir
13:31
<
clever >
nix-env keeps track of every version you install, and wont let you GC things
13:31
<
clever >
joehh: something else, if your only testing, try to stick to nix-build, rather then nix-env
13:25
<
clever >
though the name will be foobar, rather then foo
13:25
<
clever >
spacefrogg: you dont even need that, just ./foobar is enough to copy that dir
13:24
<
clever >
MoreTea: there is also runCommand
07:41
<
clever >
mg: you may want to look into nix-shell --run
07:40
<
clever >
mg: nix-shell spawns a new shell, and only returns once the user exits from that
05:25
<
clever >
while configurePhase replaces the entire default
05:24
<
clever >
dev1: preConfigure runs before the default configurePhase
05:23
<
clever >
LinArcX: what kind of thing do you want to debug?
05:23
<
clever >
LinArcX: debug it how?
04:44
<
clever >
joehh: i'm more of a nightowl, so i can see how we might be on at the same times
04:39
<
clever >
NB canada, atlantic standard time
04:36
<
clever >
joehh: nix-env -r
04:35
<
clever >
and it wont accept unknown argumentsd
04:34
<
clever >
because your module may break in 6 months when anybody adds a new argument to all modules
04:34
<
clever >
nixos may pass it more, but only config and pkgs get used
04:34
<
clever >
config and pkgs are the only ones it will use
04:33
<
clever >
it ignores all OTHERS
04:32
<
clever >
it only works in the function arguments like that
04:32
<
clever >
dev1: that lets it ignore any other arguments it was given
01:59
<
clever >
Dezgeg: armv7 builds seem broken
01:59
<
clever >
/nix/store/c57l8jl8g9b3ind5ihd3jy3m5g4n0q37-binutils-2.29/bin/ld: unrecognised emulation mode: armelf_linux_eabi
01:12
<
clever >
Dezgeg: ping?
00:10
<
clever >
and nix will directly execute ghc, and drop an ELF in /nix/store/
00:10
<
clever >
you can also just do builder = "${ghc}/bin/ghc"; args = [ "-o" (builtins.placeholder "out" ./input.hs ]; name = "binary"
00:09
<
clever >
but with a few tweaks, it could run entirely without the stdenv
00:09
<
clever >
NickHu: in this example derivation i made, it runs the bash in stdenv.shell against a builder.sh i inlined
00:08
<
clever >
how you create $out and what it does, nix doesnt care
00:08
<
clever >
NickHu: at the lowest level, all nix does is run a set builder, with the given args, and pass it a $out env variable
00:00
<
clever >
ive never messed with auth over nfs, and i avoid uid mappings as well, i just make sure the uid's match between all machines
2017-08-06
23:57
<
clever >
NickHu: but 99% of the time, you already have glibc in your nix store, so your not really saving space by trying to exclude it
23:56
<
clever >
which it used to unpack and patchelf the bootstrap tools
23:56
<
clever >
i can only think of one area in nixpkgs that absolutely requires a static binary, it has a staticly linked busybox, not even in a tar, grabbed by call to <nix/fetchurl.nix>
23:55
<
clever >
thats about the only benefit it has
23:55
<
clever >
in theory, you can just tar up a static ELF and ship it to any distro, without having to drag nix along
23:51
<
clever >
thats uses by nixos to create the initrd images
23:51
<
clever >
so you have the dynamic libs, but none of the other junk (locales, docs, share files ...)
23:51
<
clever >
NickHu: this copies the ELF programs and the .so files into a new derivation, then patchelf's the rpath to fix it
23:49
<
clever >
but you may also run into other libraries that lack static files
23:49
<
clever >
that is in the qemu expression i linked
23:47
<
clever >
NickHu: or just use dynamic, nix solves nearly all of the typical reasons you would want static for
22:10
<
clever >
avn: last i looked at it, the policies are just javascript files running in spidermonkey, that take in some state and return true/false
22:09
<
clever >
avn: thats more in the area of not-os, where i used runit
22:08
<
clever >
as long as the host has mkdir, mount, touch, mknod, and chroot in $PATH, it can enter the container
22:08
<
clever >
the goal was to be able to launch a systemd-nspawn like container, without systemd on the host
22:07
<
clever >
this is a related thing i worked on
22:07
<
clever >
so it will more happily run in a container, with full systemd
22:07
<
clever >
that will remove the kernel component and re-configure a few things
22:07
<
clever >
oh, and something else you can then try, boot.isContainer = true; and build nixos
22:04
<
clever >
but you probably want a chroot anyways
22:04
<
clever >
dtzWill: yeah, once you switch over to a nix built by nix, it may get upset at the lack of /etc/
22:03
<
clever >
98% of the time, your going to replace it with a nix-built version anyways
22:03
<
clever >
dtzWill: its sort of like building a /usr/bin/nix-build for ubuntu
22:03
<
clever >
dtzWill: i'm also not quite sure you even need the android ndk
22:02
<
clever >
avn: taktoa has been working on a project that turns a ninja file into a dervation with one .o per dervation
22:01
<
clever >
that basicaly re-implements ccache using the nix store
22:01
<
clever >
avn: incremental builds, one derivation per .o file
21:58
<
clever >
the file i pasted above solves that
21:58
<
clever >
so you have to -f '<nixkgs>' every time
21:58
<
clever >
avn: nix-env basicaly ignores the search path
21:58
<
clever >
because of this file, i can now do nix-env-iA foo.wireshark-gtk, and it grabs it from master
21:58
<
clever >
import /home/clever/apps/nixpkgs
21:58
<
clever >
[clever@amd-nixos:~]$ cat .nix-defexpr/test/foo/default.nix
21:57
<
clever >
i also recently read the code behind .nix-defexpr, and can now do fun things with it
21:57
<
clever >
avn: the entire nixpkgs set contains a pkgs attribute, that points to itself
21:57
<
clever >
avn: for a git checkout, you just want nix-env -f /home/clever/apps/nixpkgs -A wireshark-gtk
21:54
<
clever >
the name before the . comes from the names in "nix-channel --list"
21:54
<
clever >
tommd: then you want nix-env -iA nixpkgs.wireshark-gtk
21:53
<
clever >
tommd: are you on nixos or another distro?
21:52
<
clever >
tommd: nix-env -iA nixos.wireshark-gtk
21:51
<
clever >
LinArcX: the type is string, so you need to either embed it right into configuration.nix as a string, or use builtins.readFile
21:45
<
clever >
avn: Xephyr demands a valid xkb dir on the command-line
21:44
<
clever >
ive also had to deal with this when running xnest, xephyr, and xvnc
21:40
<
clever >
[clever@amd-nixos:~/apps/nixpkgs]$ ls /nix/store/5nidmghgw700wkj4pycg9a80q25qbxzb-xkeyboard-config-2.21/share/X11/xkb/
21:40
<
clever >
/nix/store/5nidmghgw700wkj4pycg9a80q25qbxzb-xkeyboard-config-2.21
21:40
<
clever >
[clever@amd-nixos:~/apps/nixpkgs]$ nix-store -qR /run/current-system | grep keyboard
21:39
<
clever >
Infinisil: in the xkb package
21:39
<
clever >
i recently noticed that the giant help button opens the help in vim
21:39
<
clever >
esc is also in the right spot
21:38
<
clever >
and the super/alt are also swapped
21:27
<
clever >
so the program must wait and see if there is more
21:26
<
clever >
LnL: part of the problem with escape in a terminal, is that things like the arrow keys send escape and another key
21:19
<
clever >
Profpatsch: nn
21:18
<
clever >
yeah, stackoverflow stopped that from happening
21:18
<
clever >
LnL: it was some weird combo of bash, tar, and something custom, and the ELF inside the tar handles the custom part
21:17
<
clever >
LnL: while trying to unpack some vmware bundles, i was using replace mode to change it from running the unpatchef elf to just unpacking, and i discovered vim appending a \n to the end of the file, breaking it
21:12
<
clever >
Profpatsch: did you see my test-ghc.nix expression?
21:09
<
clever >
Profpatsch: testing a build with the new expression...
21:04
<
clever >
aka, $out//share/x86_64-linux-ghc-8.0.2/shake-0.15.11/html
21:04
<
clever >
and if i disable all split-output, the docs land here
21:04
<
clever >
[clever@amd-nixos:~/apps/nixpkgs]$ ls -lh /nix/store/sp11wb69bhy00g7wqhls4md9mdi1qzdm-shake-0.15.11/share/x86_64-linux-ghc-8.0.2/shake-0.15.11/html/
21:03
<
clever >
this variant does build
21:03
<
clever >
nix-repl> :b haskell.lib.overrideCabal haskellPackages.shake (drv: { enableSeparateDocOutput = false; enableSeparateDataOutput = false; })
21:03
<
clever >
then the docs would land directly in $out/html
21:02
<
clever >
ah yeah, i tried to get rid of the double ghc in that path, and thats when i discovered the instability
21:02
<
clever >
and this part explains the $data/share/ghc-8.0.2 prefix
21:02
<
clever >
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
21:01
<
clever >
and putting it in data causes a cycle
21:01
<
clever >
because the default when absent isnt stable
21:01
<
clever >
i'm thinking, we must always provide --docdir
20:59
<
clever >
and data refers to out
20:59
<
clever >
and $out refers to data
20:59
<
clever >
the docs land in $data/share/ghc-8.0.2/doc/x86_64-linux-ghc-8.0.2/shake-0.15.11/html/src/Paths_shake.html
20:59
<
clever >
also, enableSeparateDocOutput = false breaks the build
20:58
<
clever >
the castle of purity is built upon a mountain of impurities
20:58
<
clever >
but --data-dir=/foobar/ wont contain the docs
20:58
<
clever >
the crazy part, is that --data-dir=/fooghcbar/ will contain the docs
20:57
<
clever >
also setting --doc-dir and --html-dir prevents that problem
20:57
<
clever >
but if ghc is not present, the docs land in --prefix=
20:56
<
clever >
if the --data-dir= contains the string "ghc", the docs go into it
20:56
<
clever >
oh, this reminds me, there is a bug in cabal itself
20:56
<
clever >
nix-repl> :b haskell.lib.overrideCabal haskellPackages.shake (drv: { enableSeparateDocOutput = false; })
20:55
<
clever >
so the question becomes, where do the docs land if we dont split
20:55
<
clever >
"/nix/store/18w3lpr7dvwgid5m6la2jb4n744gx2dv-shake-0.15.11-doc/share/doc/html"
20:54
<
clever >
nix-repl> (haskellPackages.shake.doc or haskellPackages.shake.out) + "/share/doc/html"
20:54
<
clever >
if a given attr is missing, use the 2nd value
20:54
<
clever >
nix-repl> haskellPackages.shake.docs or "not there"
20:54
<
clever >
"not there"
20:52
<
clever >
Profpatsch: i also wonder if this conf file would fix your problems?, it always points to wherever cabal was told to put docs
20:51
<
clever >
so $doc must never refer back to $out
20:51
<
clever >
Profpatsch: a .conf file within $out has the paths to haddock files in $doc
20:51
<
clever >
lib/ghc-8.0.2/package.conf.d/shake-0.15.11-JGGEmqTyo9u3rsNdYtylaz.conf:haddock-html: /nix/store/18w3lpr7dvwgid5m6la2jb4n744gx2dv-shake-0.15.11-doc/share/doc/html
20:51
<
clever >
lib/ghc-8.0.2/package.conf.d/shake-0.15.11-JGGEmqTyo9u3rsNdYtylaz.conf:haddock-interfaces: /nix/store/18w3lpr7dvwgid5m6la2jb4n744gx2dv-shake-0.15.11-doc/share/doc/html/shake.haddock
20:49
<
clever >
Profpatsch: one minute...
20:47
<
clever >
and rather then force them to debug/fix them entirely, you can just enableSeparateDocOutput = false; to merge the docs into another output
20:47
<
clever >
Profpatsch: yeah, but new packages may introduce new cycles in different files
20:47
<
clever >
i had to nuke all references to $out in the html to get rid of the cycles
20:46
<
clever >
335 remove-references-to -t $out $x
20:46
<
clever >
334 for x in $doc/share/doc/html/src/*.html; do
20:46
<
clever >
the Paths_ module in cabal already causes that problem
20:45
<
clever >
doHaddock = true; enableSeparateDocOutput = false; would solve that
20:45
<
clever >
and nix will fail the build hard
20:45
<
clever >
and $out has a haddock path in it
20:45
<
clever >
down the road, somebody may create docs that refer to $out
20:45
<
clever >
one reason i can think of to keep it, is to fix cycle problems
20:44
<
clever >
ah, i see now, enableSeparateDocOutput isnt used currently and defaults to doHaddock
20:42
<
clever >
dont remember right now
20:41
<
clever >
to set it correctly for all of haskellPackages
20:41
<
clever >
peti had made changes to cabal2nix, that scan the cabal file, and figure out if it has docs or not
20:41
<
clever >
nix staying that foo.doc doesnt exist will at least tell you, it probably doesnt have docs
20:40
<
clever >
was thinking it might lead to confusion, like you grabbed foo.doc, and then you dont have any docs???
20:39
<
clever >
so if you say you have a doc output, you must make $doc
20:39
<
clever >
the problem is that nix will fail the entire build if you dont create $doc
20:38
<
clever >
just an empty directory
20:37
<
clever >
if the package doesnt have any docs, it will result in an empty $doc output
20:35
<
clever >
Profpatsch: i believe if you turn off split docs, they just land in $out or $data
20:35
<
clever >
ah, i wasnt 100% sure on where the docs had to be within $doc
20:34
<
clever >
Profpatsch: how far back?
20:26
<
clever >
process tree and backtraces in the gist
20:25
<
clever >
the make process locked up, and hasnt been doing anything for days
20:25
<
clever >
i discovered it, because hydra says i have been building linux for 2 days 12 hours
20:23
<
clever >
i'm cheating a bit by using nix-store -r to create roots
20:23
<
clever >
i think nix-instantiate has its own flag to make roots
20:23
<
clever >
Infinisil: and if pointed to an already built storepath, it only protects that and its runtime closure
20:23
<
clever >
Infinisil: if you point it to a .drv, it will build it, and protect the default output only
20:22
<
clever >
Infinisil: nix-store -r will try to build whatever you point it to
20:21
<
clever >
DavidEGrayson: then make a root for that buildEnv derivation
20:20
<
clever >
DavidEGrayson: ah, one option is to create a new derivation, that just passes all 3 gcc's to buildEnv
20:17
<
clever >
DavidEGrayson: i think just one link to the derivation at the root is enough
20:11
<
clever >
thats what nix-build uses behind the scenes
20:09
<
clever >
hmmmm, and nixops did nothing to root its own builds, so i have another 400mb to dl
20:06
<
clever >
DavidEGrayson: manualy run this on things you know take 40 minutes, to create a root on them
20:06
<
clever >
DavidEGrayson: the only other trick, nix-store -r --add-root foo.root --indirect /nix/store/foobar
20:06
<
clever >
ive only found that hydra can root things to that level
20:05
<
clever >
LnL: but will that root the build-time deps of everything in the build-time closure?
19:59
<
clever >
g:ycm_seed_identifiers_with_syntax looks handy
19:58
<
clever >
every now and then it tells me i need to make a config file somewhere in my home dir
19:58
<
clever >
i also need to get around to doing that
19:57
<
clever >
but the ycm may have enabled the built-in autocomplete that had previously been disabled
19:56
<
clever >
it never did that until i turned on ycm
19:56
<
clever >
Infinisil: i never got around to properly configuring ycm, ive found it can only complete words already present in the open files
19:53
<
clever >
that might explain the high cpu fan speeds
19:53
<
clever >
temp1: +74.2°C (high = +70.0°C)
19:50
<
clever >
grantwu: heh
19:49
<
clever >
and because it segfaults, git just aborts the ammend
19:48
<
clever >
it happens the most when i "git commit --amend" and dont want to change the commit msg
19:47
<
clever >
LnL: ive noticed a weird problem with ycmd in vim, if i quit vim too quickly, while ycmd is starting, vim segfaults
19:41
<
clever >
leading to .git containing more history
19:41
<
clever >
so you have to fetch a branch that contains that rev
19:41
<
clever >
the git server will also refuse to let you fetch a given revision directly
19:41
<
clever >
git will keep track of branches you didnt ask for, so the latest rev of those can change
19:40
<
clever >
simpson: ive also heard that the .git folder isnt very deterministic, so the hash will just randomly break
19:39
<
clever >
it was also only added recently
06:10
<
clever >
grantwu: just related to -i vs -iA
06:01
<
clever >
grantwu: its another silly mistake that new users have done repeatedly
05:54
<
clever >
grantwu: and since you didnt tell nix-build what to build, it builds everything in the set
05:54
<
clever >
grantwu: they omited the -A argument
05:52
<
clever >
then throws out every broken package in the entire set
05:52
<
clever >
and nix-build happily tries to build everything
05:52
<
clever >
grantwu: at least twice, ive seen people run nix-build in the root of something like nixpkgs
05:12
<
clever >
NickHu: line 7-13 also explains how the repo is made
05:12
<
clever >
NickHu: so you want to check both the git history on this file, the maintainers, and possibly open an issue on nixpkgs and/or debian.org
05:11
<
clever >
NickHu: if i eval firmwareLinuxNonfree.meta.position in nix-repl, i get pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix:28"
04:54
<
clever >
robot: turning it on will auto-configure everything, and install libvirt
04:53
<
clever >
This option enables libvirtd, a daemon that manages virtual machines. Users in the "libvirtd" group can interact with the daemon (e.g. to start or stop VMs) using the virsh command line tool, among others.
04:52
<
clever >
robot: did you also virtualisation.libvirtd.enable ?
04:52
<
clever >
though it defaults to true
04:52
<
clever >
robot: virtualisation.libvirtd.enableKVM maybe
04:51
<
clever >
qemu works fine, when ran directly
04:51
<
clever >
ah, you didnt mention that
04:36
<
clever >
robot: it just works out of the box
04:19
<
clever >
and :r to reload every time you change the config files
04:19
<
clever >
maybe :b config.hardware.firmware
04:19
<
clever >
NickHu: yeah, nix-repl '<nixos/nixos>' and then "${config.hardware.firmware}"
04:18
<
clever >
you will want to check in that resulting path, both to confirm it symlinked the right version, and that the files are in the right area
04:17
<
clever >
NickHu: and if you read /etc/modprobe.d/nixos.conf, you will find the path to the firmware, after nixos has merged foo and non-free
04:15
<
clever >
so you have clear control of the order
04:15
<
clever >
so its best to hardware.enableAllFirmware = false; and then hardware.firmware = [ foo pkgs.firmwareLinuxNonfree ];
04:15
<
clever >
but i'm not sure where all-firmware.nix will put it
04:14
<
clever >
the order of entries in hardware.firmware will control that then
04:14
<
clever >
NickHu: and removing the enableAllFirmware bit will prevent the conflict
04:14
<
clever >
2017-08-06 01:01:09 < clever> if you remove the scan file, you can just do something like this
04:13
<
clever >
you will need to adjust the mkdir and cp to recreate the right layout
04:13
<
clever >
the cp command in here will adjust copy it from one area to another
04:13
<
clever >
let foo = runCommand "bar" { src = pkgs.fetchFromGitHub { ... }; } "mkdir -pv $out/lib/firmware; cp $src $out/lib/firmware/output" in ...
04:13
<
clever >
the runCommand above creates an entirely new firmware package
04:08
<
clever >
you will either want to add a pkgs.fetchgit, pkgs.fetchFromGitHub, or just clone it by hand and refer to it via ./input-dir
04:01
<
clever >
hardware.firmware = [ foo ];
04:01
<
clever >
let foo = runCommand "bar" {} "mkdir -pv $out/lib/firmware; cp ${./input-dir} $out/lib/firmware/output" in ...
04:01
<
clever >
if you remove the scan file, you can just do something like this
03:54
<
clever >
core.c: scnprintf(filename, sizeof(filename), "cal-%s-%s.bin",
03:53
<
clever >
each slot in the machine will load a different firmware file
03:53
<
clever >
which is very weird
03:53
<
clever >
it also has the pci bus-id in the name
03:51
<
clever >
i'm guessing thats calibration data
03:44
<
clever >
and if i cross-reference the firmware package and your dmesg, i can see its loading from this region
03:44
<
clever >
$ ls -lh /nix/store/vkf6qyph8sc433sz714bzdhwhi827x3p-firmware-linux-nonfree-2017-03-11/lib/firmware/ath10k/QCA6174/
03:44
<
clever >
so the file "scan/not-detected.nix" doesnt scan for anything, it just blindly enables everything
03:43
<
clever >
the literal "or" on 46 is another thing
03:43
<
clever >
the || on 36
03:43
<
clever >
line 36 is has an or in it
03:42
<
clever >
NickHu: because #1 is in your imports, everything under #2 is active
03:37
<
clever >
though that naming is a bit off
03:36
<
clever >
NickHu: given what i read recently about broadcom chips, and this error, i suspect it might not be finding any firmware, and then defaulting to the firmware in the chip's rom
03:36
<
clever >
[ 7.071837] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
03:35
<
clever >
NickHu: what is in your configuration.nix and hardware-configuration.nix?, anything named detect?
03:32
<
clever >
NickHu: and also you need to create a derivation that puts files at $out/lib/firmware, and then push that derivation into hardware.firmware
03:32
<
clever >
NickHu: ^^^
03:32
<
clever >
oops, did it again, lol
03:32
<
clever >
Nobabs27: dmesg | grep ath10k_pci -C5
03:31
<
clever >
Nobabs27: re-run that grep with -C5
03:30
<
clever >
can you pastebin the output of dmesg?
03:29
<
clever >
dmesg should say what file is using and give more info
03:28
<
clever >
what does dmesg say and what is not working right?
03:27
<
clever >
the driver sends a special message down to udev, saying which file it wants, and udev must then supply that file
03:27
<
clever >
it will always load the one the driver asks for, so you cant easily make it load a different file
02:59
<
clever >
ive now been on xterm for over a decade, and i cant use any other terminal
02:59
<
clever >
back when i started linux, gnome-terminal was horid slow (my cpu was only ~600mhz), so i used xterm
02:59
<
clever >
left and middle click also have their own menus
02:57
<
clever >
adelbertc: also, there are some hidden menus in xterm, hold control and hold right click