2020-07-25
23:49
<
clever >
installingNIX: yeah
23:48
<
clever >
adyatlov: then add pkgs to the args where it gets every other package
23:47
<
clever >
adyatlov: if your not changing common.nix, you can just do (pkgs.path + "/nixos/pkgs/applications/editors/jetbrains/common.nix") for its path
23:44
<
clever >
zeta_0: maybe
23:33
<
clever >
installingNIX: if you enable xfce, it installs it for you
23:29
<
clever >
installingNIX: download finished, its 2.1gig
23:25
<
clever >
installingNIX: github is also rather slow at generating those files, i have fiber internet, and its still not done
23:25
<
clever >
zeta_0: you want to put that function into its own file, and then do (pkgs.callPackage ./ownfile.nix {})
23:25
<
clever >
zeta_0: line 23-37 is defining a function, but you jammed it into the middle of buildInputs, which wants a derivation
23:24
<
clever >
installingNIX: only if you want them
23:24
<
clever >
installingNIX: or not install nerd-fonts
23:23
<
clever >
installingNIX: all you can do is wait
23:23
<
clever >
installingNIX: github also doesnt report the size of the file, so you have no progress information
23:23
<
clever >
installingNIX: its downloading nerd-fonts, which is a fairly big file
23:22
<
clever >
installingNIX: what about urls?
23:22
<
clever >
installingNIX: srcs, not source
23:19
<
clever >
installingNIX: just run cat on it then, what is the srcs ?
23:19
<
clever >
installingNIX: no, the check is checking if the path begins with /nix/store/
23:18
<
clever >
installingNIX: you dont need to
23:15
<
clever >
installingNIX: its in /mnt/nix/store/
23:14
<
clever >
installingNIX: run `nix show-derivation` on that drv, what is the srcs?
23:13
<
clever >
installingNIX: what is it downloading?
23:12
<
clever >
installingNIX: requireFile never downloads anything
23:12
<
clever >
adyatlov: you can also newPkgs.path to get the path
23:12
<
clever >
adyatlov: fetchTarball returns the path to nixpkgs
23:09
<
clever >
read the old expr, or fork nixpkgs
23:09
<
clever >
you need to callPackage common.nix yourself
23:09
<
clever >
it winds up using the old name
23:09
<
clever >
adyatlov: also, the funcion for packaging jetbrains things does ${name}, so you cant override the name
23:08
<
clever >
adyatlov: that string is in the name field your setting
23:06
<
clever >
installingNIX: yeah
23:05
<
clever >
adyatlov: is the hash correct?
23:01
<
clever >
adyatlov: the pair of overrideDerivation and (old: { ..}) needs another () around the whole pair
23:01
<
clever >
adyatlov: no, add more!
23:00
<
clever >
adyatlov: you have a list with 2 functions, not the result of applying the function on the value
22:59
<
clever >
> let func = a: b: a*b; in [ func 2 3 ]
22:59
<
clever >
adyatlov: () are the problem
22:57
<
clever >
installingNIX: probably
22:55
<
clever >
adyatlov: yep
22:55
<
clever >
adyatlov: yeah
22:55
<
clever >
installingNIX: the problem is because oracle is being sneaky, and changing the contents of the tar while claiming its the old one
22:54
<
clever >
adyatlov: ah, that one only has overrideDerivation for a weird reason
22:53
<
clever >
installingNIX: it just gives you an error, telling you to go to the given page and download it yourself
22:53
<
clever >
installingNIX: requireFile is a special function, for files nix cant download on its own
22:52
<
clever >
installingNIX: thats why i said that `src = ./jdk-8u261-linux-x64.tar.gz` would be a much simpler override
22:49
<
clever >
2020-07-25 19:38:53 < clever> installingNIX: you need to read the old expression, and then copy/paste the requireFile part over, changing the hash
22:49
<
clever >
the file it opens is read only
22:48
<
clever >
it will insert the current host platform (32bit or 64bit) into that, and do something like sha256.x86_64-linux
22:47
<
clever >
installingNIX: the "sha256" matches the 3rd parameter, called "sha256"
22:46
<
clever >
installingNIX: line 84, is referencing the function argument on line 3
22:44
<
clever >
installingNIX: 1-6 of the nix file
22:43
<
clever >
installingNIX: but if your overriding the hash, you can just skip that, and do sha256 = "hashgoeshere";
22:43
<
clever >
installingNIX: lines 1-6 define a function that takes 5 arguments, the 3rd one being sha256, a set from platform to hash
22:41
<
clever >
installingNIX: the drv file is much easier to read if you run `nix show-derivation` on it
22:39
<
clever >
,paste installingNIX
22:39
<
clever >
installingNIX: run `nix edit nixpkgs.oraclejdk8` to see the old expr
22:38
<
clever >
installingNIX: you need to read the old expression, and then copy/paste the requireFile part over, changing the hash
22:37
<
clever >
> :p [ {a="set";} 1 "two" true ]
22:37
<
clever >
yep, a list can have a mix of any type
22:37
<
clever >
> :p let func = a: b: a*b; in [ (func 2 3) ]
22:36
<
clever >
> let func = a: b: a*b; in [ (func 2 3) ]
22:36
<
clever >
list has higher priority, so it makes an array of 3 elements, instead of running the func
22:36
<
clever >
> let func = a: b: a*b; in [ func 2 3 ]
22:35
<
clever >
except when you have a list
22:35
<
clever >
installingNIX: any time you have more then 1 value in a place that you expected just 1 value, the 1st one is a function
22:34
<
clever >
without () around it
22:34
<
clever >
installingNIX: the () is needed, because the old: {} cant parse right
22:34
<
clever >
> let func = a: b: a*b; in func 2 3
22:34
<
clever >
installingNIX: nope, its a method because there is an argument after it
22:33
<
clever >
adyatlov: yes
22:33
<
clever >
installingNIX: yes
22:32
<
clever >
adyatlov: you have to use overrideAttrs and change the name and src
22:31
<
clever >
adyatlov: nope, version isnt an argument to the file, so .override cant change it
22:31
<
clever >
,pills installingNIX
22:30
<
clever >
installingNIX: old: { ... } is then another function, that is given the old set, and returns a set of things to change
22:29
<
clever >
installingNIX: and then it is followed by an argument in (), so treat overrideAttrs as a function, and call it
22:29
<
clever >
installingNIX: oraclejdk8.overrideAttrs says to look at the attribute on oraclejdk8 that is called overrideAttrs, exactly the same as object.attr would in js or c++
22:28
<
clever >
installingNIX: it would be more like oraclejdk8.overrideAttrs (old: { src = requireFile { hash = "..."; something = "something"; })
22:28
<
clever >
installingNIX: outputHash isnt a function
22:27
<
clever >
installingNIX: yeah, thats probably simpler
22:26
<
clever >
installingNIX: .withPackages is a python only thing
22:25
<
clever >
installingNIX: you want something like oraclejdk.overrideAttrs (old: { src = ./path/to/file.tar.gz; })
22:23
<
clever >
installingNIX: very, thats why you do an override in the expression
22:17
<
clever >
adyatlov: only the process triggering the build can get realtime logs
22:16
<
clever >
installingNIX: its the outputHash
22:16
<
clever >
installingNIX: run `nix show-derivation` on the failing .drv file
22:16
<
clever >
adyatlov: `nix-store -l` and `nix log` can read them
22:16
<
clever >
adyatlov: nope, the logs always go to /nix/var/log/
22:13
<
clever >
you can do a package override against it, as with any other package
22:12
<
clever >
installingNIX: the .tar.gz you download, must be binary identical to the one nix is expecting
04:35
<
clever >
its the old (and semi stupid) notion, that anything that needs root, belongs in sbin, and you can then omit it from non-root $PATH
04:35
<
clever >
wrapProgram ...
04:35
<
clever >
${old.postFixup}
04:34
<
clever >
energizer: you want postFixup = ''
04:34
<
clever >
energizer: the fixup phase moves everything in sbin to bin, but your using preFixup, so it hasnt been moved yet!
04:34
<
clever >
energizer: its in $out/sbin/
04:34
<
clever >
libtool: install: /nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin/install -c .libs/airodump-ng /nix/store/isglw783kbjcli13a02kb4yhl352wpc8-aircrack-ng-1.6/sbin/airodump-ng
04:33
<
clever >
energizer: well, it at least compiled it...
04:33
<
clever >
CC src/airodump-ng/airodump_ng-airodump-ng.o
04:30
<
clever >
configure likely said why
04:29
<
clever >
check the output that ./configure printed?
04:29
<
clever >
energizer: airodump-ng truely doesnt exist!
04:27
<
clever >
energizer: add `ls -lh $out/bin/` to the preFixup, what is in there?
04:25
<
clever >
energizer: when does it complain? when building aircrack-ng?
03:59
<
clever >
energizer: you want wrapProgram and --prefix PATH
03:59
<
clever >
energizer: propagatedBuildInputs is only available at build time, for other things that depend on that package
03:17
<
clever >
hazel[m]: i also tend to put each virtualhost for nginx into its own module, so i can move that host to another box, with minimal effort
03:15
<
clever >
it then branches out, to various feature files, and most end in core.nix
03:15
<
clever >
every machine starts at a note, like nas.nix or laptop.nix
03:15
<
clever >
similar here, ive got a bit of a mix of 2 trees
03:14
<
clever >
not sure how icecast and rtmp can interact though
03:13
<
clever >
i like the idea of having nixos host everything, dont rely on any outside distro's
03:10
<
clever >
something to do with the state in xorg for me, causes obs to leak a gig of swap every 5 seconds
03:10
<
clever >
but the obs client leaks memory hard lately
03:09
<
clever >
ive use obs-studio before, with rtmp hosted by nginx under nixos
03:09
<
clever >
guessing its audio only?
03:08
<
clever >
ah, now it has a gui
03:08
<
clever >
the help isnt very helpful
03:08
<
clever >
[clever@amd-nixos:~/apps]$ result/bin/butt --help
03:08
<
clever >
[clever@amd-nixos:~/apps]$
03:07
<
clever >
hows it started?
03:07
<
clever >
hazel[m]: i can hear some music
03:04
<
clever >
libjpeg into buildInputs, and it builds
03:03
<
clever >
libjpeg.out 0 s /nix/store/fglwxpvjlp640bysv8lqyg637gn7cm7b-libjpeg-turbo-1.5.1/lib/libjpeg.so
03:03
<
clever >
[clever@amd-nixos:~/apps]$ nix-locate libjpeg
03:03
<
clever >
thats what happens when you assume the cause of an error
03:02
<
clever >
it failed to compile, therefore, malloc doesnt work!!
03:02
<
clever >
hazel[m]: it tries to link with jpeg, when testing if malloc works
03:02
<
clever >
hazel[m]: (facepalm)
03:02
<
clever >
/nix/store/klg7ribk7f834yb0hn1fxs6653wzlncb-binutils-2.31.1/bin/ld: cannot find -ljpeg
03:02
<
clever >
hazel[m]: and if you build with --keep-failed, and it fails, you can read config.log...
03:01
<
clever >
maybe --enable-malloc?
03:00
<
clever >
hazel[m]: does ./configure --help show anything relevant?
02:59
<
clever >
hazel[m]: i think this is your problem
02:59
<
clever >
checking for GNU libc compatible malloc... no
02:57
<
clever >
autom4te.cache/traces.1:m4trace:configure.ac:153: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */
02:57
<
clever >
hazel[m]: its definitely configure thats doing it, maybe it has an off swich?
02:57
<
clever >
configure:$as_echo "#define malloc rpl_malloc" >>confdefs.h
02:55
<
clever >
patches = [ ./foo.patch ];
02:55
<
clever >
so id say config.h is to blame, and that line should be killed
02:55
<
clever >
config.h is trying to remal malloc to rpl_malloc, but rpl_malloc doesnt exist
02:55
<
clever >
../config.h:169:16: error: 'rpl_malloc' was not declared in this scope 169 | #define malloc rpl_malloc
02:54
<
clever >
hazel[m]: got the full error, i just build the above nix
02:52
<
clever >
can you pastebin the full error output?
02:52
<
clever >
then it wasnt reconf
02:51
<
clever >
hazel[m]: nativeBuildInputs is for tools used at build time, buildInputs is for libraries used at runtime
02:50
<
clever >
hazel[m]: `nativeBuildInputs = [ autoreconfHook ];` will run reconf for you
2020-07-24
23:50
<
clever >
praduca: you can use mkForce to force your own choice onto that option
22:21
<
clever >
in the end, it still evals down to a .drv file, and nix-daemon builds it as normal
22:21
<
clever >
yeah, thats a lisp based expression language, ontop of the existing nix-daemon and drv files
22:19
<
clever >
it cant be un-parsed
22:19
<
clever >
no real way to undo that
22:19
<
clever >
they turn into pointers to c++ functions
22:19
<
clever >
functions dont even remain intact
22:19
<
clever >
and `1 * 2` turns into `__mul 1 2`
22:18
<
clever >
<nixpkgs> magically turns into __findFile __nixPath "nixpkgs" i believe
22:17
<
clever >
cant easily do that, because the nix parser mutates the syntax a lot
22:15
<
clever >
that write an expression to a file, and then 11 points NIX_PATH to it
22:15
<
clever >
ashkitten: line 5-6
22:11
<
clever >
ashkitten: though if the $HOME overlays are missing, it doesnt amtter as much
22:10
<
clever >
ashkitten: i think that has priority over the ones in $HOME
22:10
<
clever >
ashkitten: lines 10-14 will setup $NIX_PATH to look for overlays in /run/current-system/overlays, and line 17 will then put the overlays there
22:00
<
clever >
cole-h: the problem is specific to that version of nixops i believe
21:59
<
clever >
adisbladis: where is your purity now? :D
21:57
<
clever >
gchristensen: it will impurely load the config.nix and overlays from $HOME
21:56
<
clever >
gchristensen: that forces every machine in the cluster to use a single instances of pkgs, and ignore nixpkgs.overlays/nixpkgs.config
21:56
<
clever >
gchristensen: oh, are you setting nixpkgs.pkgs via nixops?
21:53
<
clever >
gchristensen: are you able to reproduce the issue with a minimal set of nix files you can publish?
21:52
<
clever >
cab404[m]: nix always disables the network while building things, so you cant clone things like that
21:51
<
clever >
gchristensen: any containers at play? or nixpkgs.pkgs ?
21:48
<
clever >
cab404[m]: need more context, what derivation caused it?
21:44
<
clever >
cab404[m]: sounds like the network sandbox is doing its job perfectly
21:39
<
clever >
Fare: then nix-build it, and read the file it generated
21:39
<
clever >
Fare: try doing `runCommand "test" { buildInputs = [ git ]; } "cp -r ${./.git} .git; git describe --tags --always output > $out"`
21:33
<
clever >
Fare: thats where commitIdFromGitRepo is better
21:33
<
clever >
Fare: it returns all 0's if the tree is dirty, if you have any changes at all
21:25
<
clever >
noonien: you can override the url it will look at
21:24
<
clever >
nix show-config | grep hashed-mirrors
21:23
<
clever >
for any open-source fixed-output derivation in nixpkgs, the tarball gets uploaded there, indexed by hash
21:22
<
clever >
noonien: the tarball mirror at tarballs.nixos.org does sorta do the same thing
21:21
<
clever >
noonien: you can also just do `hello.overrideAtts (old: { src = ./hello.tar.gz; })` to force it to use a given tar, in your repo
21:21
<
clever >
noonien: or host a copy of the .tar.gz yourself somewhere
21:21
<
clever >
noonien: ahhh, so when the deps go away, yeah, thats where github can help, repos are less likely to vanish
21:19
<
clever >
noonien: i just commit the default.nix to the project, and then anybody that clones it can just nix-build, and it builds
21:16
<
clever >
noonien: just put a default.nix in the project, and run nix-build on it
21:08
<
clever >
noonien: and for disk usage, `du -hc --max=0 $(nix-store -qR $out) | sort -h`
21:06
<
clever >
noonien: nix-store --query --deriver
21:04
<
clever >
not sure, you may need to just run `git log` in a derivation that includes `.git`
21:03
<
clever >
noonien: run `nix-store -q --tree` on both the $out and the drv file
21:02
<
clever >
Fare: you should also look into lib.commitIdFromGitRepo too
18:24
<
clever >
Fare: try using that instead?
18:24
<
clever >
cole-h: thats the one!
18:21
<
clever >
Fare: one of many solutions, is to just run builtins.fetchGit ./., the attr set returned tells you the git revision, if its clean
18:20
<
clever >
gchristensen: what was the function called? i'm drawing a bit of a blank.....
18:19
<
clever >
Fare: there are already pure nix exprs to do exactly that
18:06
<
clever >
Fare: what are the contents of build.ss?
18:05
<
clever >
Fare: that sounds like something you can do without recursive nix
18:01
<
clever >
Fare: running nix-build inside a nix build
17:58
<
clever >
another anoyance, that pure nix kinda forces on you (but recursive nix solves), is that you have to re-compres the layers each time you build
17:57
<
clever >
so you could build 3 or 4 images, run X on all 4, then get a tuned config blob
17:57
<
clever >
maybe something like PGO, where you give it a blob from past analasis?
17:57
<
clever >
yeah, and that can be tricky
17:52
<
clever >
though you may want some dummy config to delta, and see how much the layers changed
17:51
<
clever >
yeah, since its a pure function and doesnt depend on deltas, you can easily generate it for any given package, at the current ver
17:51
<
clever >
so my savings are <50% of the total image
17:50
<
clever >
my problem, is that the last layer is almost always larger then every other layer combined
17:50
<
clever >
what about spreading the bulk evenly?
17:39
<
clever >
usually with 3 manual layers, common unixy tools, the app itself, a shell sript to launch the app
17:39
<
clever >
ive found things simpler, to juse use the non-layered function, and chain it
17:37
<
clever >
and the grouping always happens at the last layer
17:37
<
clever >
its not able to group things together, until it runs out of layers
17:37
<
clever >
gchristensen: ah, that would explain the problems ive been seeing
17:35
<
clever >
i'm thinking anything you didnt name, just goes into its own layer(s) as before
17:33
<
clever >
Fare: i have seen problems where there are to many layers and it tends to make a 1gig layer at the end
17:33
<
clever >
gchristensen: outer list is layers, inner lists are derivations
17:32
<
clever >
gchristensen: a list of lists maybe?
17:26
<
clever >
you dont really want to use /. you want to always start with something relative like ./.
17:25
<
clever >
/. i knew of
17:24
<
clever >
pie_: /. or toPath?
16:09
<
clever >
what do the logs say?
15:57
<
clever >
mostly, info relating to the copy of grub in the MBR
15:57
<
clever >
so it knows when to re-run grub-install
15:55
<
clever >
infinisil: grub does something similar, via /boot/grub/state
15:52
<
clever >
infinisil: compare the kernel in /run/booted-system and /run/current-system ?
01:28
<
clever >
Church-: nix.package can be used to force a different derivation for the nix binary
01:28
<
clever >
alexissa: the true error is hidden by parallel jobs, try again with `--option cores 1`
01:10
<
clever >
ah, dont know about that
01:09
<
clever >
Church-: you could add a checkPhase that runs the binary in some way
01:06
<
clever >
[root@amd-nixos:~]# nix-channel --list
01:05
<
clever >
Church-: you need to either update the nixos channel or set nix.package in configuration.nix and then nixos-rebuild
01:04
<
clever >
Church-: nixos or other?
2020-07-23
23:30
<
clever >
energizer: not really, because self is the same for every overlay, but super is different for each overlay
23:28
<
clever >
you usually use self, but sometimes need super to avoid infinite recursion
23:28
<
clever >
super is the previous version of pkgs, self is the final version with the overlay included
23:28
<
clever >
wucke13: have you tried as an overlay instead? nixpkgs.overlays = [ (self: super: { unstable = ...; enlightenment = { enlightenment = self.unstable.....; }; }) ];
23:26
<
clever >
wucke13: does it say which line and column the error is on?
23:23
<
clever >
wucke13: try removing the `rec` on line 1
23:22
<
clever >
yeah, hydra is more about building things then causing side-effects
23:21
<
clever >
arianvp: make sense so far?
23:20
<
clever >
if you switch to the jobs tab, youll see the 6 attributes in my release.nix, and their status over time
23:20
<
clever >
so hydra will just fetch the latest version of that branch for both repos, and then build every attribute in the given release.nix
23:20
<
clever >
and then up a bit under `nix expression`, it says to run release.nix from the input called nixos-configs
23:19
<
clever >
the inputs tells hydra to fetch nixos-configs and nixpkgs-channels, using the branches master and nixos-unstable-small
23:19
<
clever >
arianvp: first, start on a configuration tab like this
23:18
<
clever >
arianvp: hydra can also generate graphs showing the closure size
23:16
<
clever >
arianvp: i notice that the new yubikey-agent doesnt respect its own enable flag, and will always be installed!
23:15
<
clever >
arianvp: the diff to nixpkgs that triggered the build, and what stuff it had to rebuild for the nas
23:13
<
clever >
it gc roots everything on itself, so it doesnt have to fetch things from a cache every time it starts up
23:13
<
clever >
i use hydra for building my nixos images
23:12
<
clever >
its not on system wide, but certain things that are cheap to build, are just always built
23:12
<
clever >
2020-07-23 20:09:33 < clever> and both flags are per-derivation things
23:12
<
clever >
arianvp: this flags all unit-script derivations to avoid build machines, and never query the cache
23:11
<
clever >
85 preferLocalBuild = true;
23:11
<
clever >
86 allowSubstitutes = false;
23:11
<
clever >
74 writeTextFile =
23:11
<
clever >
205 in pkgs.writeTextFile { name = mkScriptName name; executable = true; inherit text; };
23:11
<
clever >
204 let mkScriptName = s: "unit-script-" + (replaceChars [ "\\" "@" ] [ "-" "_" ] (shellEscape s) );
23:09
<
clever >
run nix-diff on the 2 versions
23:09
<
clever >
and both flags are per-derivation things
23:09
<
clever >
nope, both are off by default
23:05
<
clever >
it will still try to query the cache, which is disabled via a 2nd flag
23:05
<
clever >
arianvp: i believe preferLocalBuild just stops it from using build machines, when possible
22:28
<
clever >
ornxka_: you can change that to a lower number, or gc -d to delete generations
22:28
<
clever >
ornxka_: the last boot.loader.grub.configurationLimit generations of nixos are copied to /boot on each switch
22:18
<
clever >
--fast will still copy all of the secrets to /boot/ every time
15:51
<
clever >
dejanr: initialPassword only takes effect the first time the vm boots, delete the rootdisk in the current dir
15:28
<
clever >
dejanr: you need to use users.users.X.initialPassword to set a pw
15:17
<
clever >
o1lo01ol1o: just nix-build the right iso attr of nixos/release.nix, but add --arg configuration ./configuration.nix
12:35
<
clever >
mudri: yeah
12:28
<
clever >
mudri: but it forces all playback to be mono
12:28
<
clever >
mudri: only thing close that ive played with, is the echo cancelation stuff in pulseaudio
03:12
<
clever >
it should probably be renamed to fetchAndUnpack, but have fun with the replace-all :P
03:12
<
clever >
so fetchzip will unpack, and hash the contents intead
03:12
<
clever >
causing the sha256 to change randomly
03:12
<
clever >
i think the main point, is that a lot of lazy websites, will dynamically generate the zip file on the fly, and mess up timestamps
03:11
<
clever >
but it still tries every unpacker it knows of