<clever>
then `runhasekell Setup.hs configure ; runhaskell Setup.hs build`
<clever>
N0elkwan: or, nix-shell -E '((import <nixpkgs>{}).haskellPackages.callCabal2nix "foo" ./. {}).env' to load all of the deps for foo.cabal
<clever>
:D
<clever>
and its no longer a NSFW number, lol
<clever>
and now its right back to where it was, lol
<clever>
its clever++
<clever>
super is all overlays before the current one
<clever>
self is the final pkgs, after applying all overlays
<clever>
an overlay accepts 2 arguments, normally called self and super
<clever>
Widdershin: in the overlay, self is an argument to the function on line 1
<clever>
on my machine, its flagged as broken
<clever>
error: Package ‘self-4.5.0’ in /nix/store/qgimqkw4dcza4zddkmbfhmgg6ca8inz8-nixos-19.03pre165037.eebd1a92637/nixos/pkgs/development/interpreters/self/default.nix:37 is marked as broken, refusing to evaluate.
<clever>
it depends on the version of nixpkgs
<clever>
you want just stdenv
<clever>
> self.meta.description
<clever>
Widdershin: oh, line 5, your doing self.stdenv, so it has to eval "self"
<clever>
Widdershin: any changes with --show-trace ?
<clever>
Widdershin: try changing line 1 of wabt.nix to { pkgs ? import <nixpkgs> { config = {}; overlays = []; } }:
<clever>
and this error cant --show-trace anyways
<clever>
oh, misread that, its -v, not --show-trace
<clever>
Widdershin: what is the contents of nick.nix, the path is on line 28
2019-01-16
<clever>
rain1: or just `nix-shell -p autoreconfHook clangAnalyzer valgrind`
<clever>
oops
<clever>
rain1: or just `nix-shell autoreconfHook clangAnalyzer valgrind`
<clever>
maybe gist both the module defining the config, and configuration.nix
<clever>
ivan: can you pastebin your current config?
<clever>
ivan: either `lib.mkOption` or put `with lib;` near the top
<clever>
bsima: a function it will run on the drv, before using it
<clever>
Taneb: also, click the use button on some random options, then scroll down
<clever>
Celmor: when did you last `sudo nix-channel --update` ?
<clever>
Celmor: what channel are you on? `sudo nix-channel --list`
<clever>
Celmor: and you shouldnt try to change stateVersion to upgrade it
<clever>
Celmor: no
<clever>
johnw: i think it obeys the remote nix.conf file
<clever>
thoughtpolice: whats wrong with just running a hydra that hosts the result of the full build (and anything hydra had to dl to do so)
<clever>
Dedalo: i expect the nixpkgs expression for zfs to do that for you, when the update comes around
<clever>
Dedalo: the problem feature is only used to make checksums run faster, and the optional thing can just be turned off
<clever>
so you need a special function to save&restore it, to not clobber whatever userland proc was using the FPU last
<clever>
WhittlesJr: as for why FPU stuff is special in kernel, most of the context-switching in the kernel assumes the FPU is not in use, so it doesnt need to backup and restore the FPU registers (huge) when context switching
<clever>
slack1256: nix-store -r /nix/store/foo
<clever>
__monty__: and also, all lists require the key/value pairs to be sorted by the key as an int
<clever>
so you can then lookup the "name" of a derivation, without ever doing strcmp("name",foo)
<clever>
and the int behind it is stored into a global variable
<clever>
certain keys like "name" are also pre-allocated early in the nixexpr startup
<clever>
so all set lookups are based on int
<clever>
there is a single global table, that maps the strings to ints
<clever>
__monty__: another implementation detail, is that all sets, are technically int->value, rather then string->value
<clever>
saves a pointer redirection, and allocating a tiny thing on the heap
<clever>
yeah
<clever>
and [1,2,3] and larger, store a pointer to the start of the list, and the size of the list
<clever>
__monty__: [1,2] stores 2 value*'s directly there
<clever>
__monty__: a [1] stores the value* directly in the first pointer
<clever>
__monty__: yeah, behind the scenes, all values are a union over a value about 2 pointers long
<clever>
duairc: make a foo.nix for foo.cabal, using cabal2nix, then callPackage all of those inside the overrides = ... block of a haskell package override
<clever>
duairc: so most cabal files must be built by nix in /nix/store/ and then you get a shell suitable for developing one
<clever>
duairc: nix can only provide a shell suitable for a single cabal file by default
<clever>
duairc: you can also skip the nixpkgs config and just directly to myHaskellPackages = pkgs.haskell.packages.ghc843.override { overrides = ....
<clever>
babic: make a single default.nix that loads others with callPackage
<clever>
line 49 is the closest you get
<clever>
ahh
<clever>
samueldr: switch-to-configuration must have been ran though, for /boot/ to be configured?
<clever>
gchristensen: no ssh, had to run nixos-generate-config on an x86 machine
<clever>
nixos-rebuild and friends, on a fresh aarch64 image
<clever>
gchristensen: also, due to entirely lacking a /etc, the configuration.nix for above was missing, so we had to nixos-generate-config one, and then fix it to not use grub
<clever>
gchristensen: the bigger pain-point, is that the fresh img from hydra, lacks /etc/NIXOS, and /nix/var/nix/profiles/system, so nixos-enter really doesnt like it
<clever>
gchristensen: that SD card also needed a `switch-to-configuration boot` as well, but thats easy enough
<clever>
you probably need root then, or blindly loop over every .drv, or a new command in the daemon protocol
<clever>
yeah, and its the wrong drv
<clever>
ottidmes: dang, only works if the given drv exists in the store
<clever>
cat: /nix/store/w9qswqwxbwymi1v068m8ha6yqz4cl64f-glibc-2.27.drv: No such file or directory
<clever>
gchristensen: thats 80% of it, but what about the last 3 flags?
<clever>
NIX_REMOTE=local?root=/mnt/img/ nix-env --profile /mnt/img/nix/var/nix/profiles/system --set -f '<nixpkgs/nixos>' -A system -I nixos-config=/mnt/img/etc/nixos/configuration.nix --option system aarch64-linux
<clever>
gchristensen: and for extra points, can you identify what this command does?
<clever>
gchristensen: just evaling pkgs.hello results in 948 calls to chooseDevOutputs!
<clever>
calls to 379 functions: 948 'chooseDevOutputs' at /nix/store/4rq3vfnl8pyvy7xg2z29862s7badfcv1-nixos-19.03pre158246.6141939d6e0/nixos/lib/attrsets.nix:465:22
<clever>
gchristensen: ive also wanted to extend it, to include time spend in nix exprs
<clever>
gchristensen: nix-count-calls probably could help
<clever>
and that allows comparing call-counts between iterations
<clever>
nh2: oh, i also had to patch these profiling functions, to support json output
<clever>
,profiling
<clever>
it was literally faster to rewrite half of snack and add a primop to nix, then it was to wait for the eval
<clever>
nh2: while that 48+ hour eval ran, i was able to find, and fix, enough bugs, that i got the same eval to <30 seconds
<clever>
nh2: i discovered this, when i tried using snack on cardano-sl, just the nix eval alone, for one cabal file, took over 48 hours, and i gave up on it :P
<clever>
and i think lib.remove is nearly as bad
<clever>
so, for a 100 element list, with no dups, that in the area of 100*100 list concats, that grow with every operation
<clever>
lib.unique, is also recursive, it will just do [ 1stelement ] ++ lib.remove 1stelement (sublist all-but-first)
<clever>
(need to finish the PR)
<clever>
(without bounds checking, so it can segfault)
<clever>
my builtins.sublist, is a single memcpy, of the range in question
<clever>
each one, involves a memcpy of the entire array of `class Value`
<clever>
so getting the 2nd thru 100th element of a 100 element list, involves nearly 100 list concats
<clever>
nh2: its recursively fetching one element and ++'ing lists together