<clever>
leotaku: due to the nix sandbox, it tries to open "unknown" rather then "/etc/mtab"
<clever>
leotaku: as a random example, net-snmp will check for the existance of files in /etc/ to during ./configure, and bake the answer into the source
<clever>
yayforj: run nix-shell on the .drv file
<clever>
> "${./doesntexist}"
<clever>
> "${/pkgs}"
<clever>
tilpner: and it just feels wrong :P
<clever>
tilpner: it may throw an exception in the future, when paths to non-existant files become an error
<clever>
tilpner: thats an absolute path to a file that doesnt exist, which is then blindly being turned into a string, and concat'd on
<clever>
tilpner: you want to quote that part of the path
<clever>
tilpner: /pkgs/applications is an abolute path, starting at /, the root dir
<clever>
Dedalo: if you have a channel called nixos-hardware, then you can use <nixos-hardware/common/pc/laptop/cpu-throttling-bug.nix>
<clever>
Dedalo: add just that file to your imports list
<clever>
iqubic: and extra-libraries tells cabal to just -lfoo
<clever>
iqubic: i'm guessing that pkgconfig-depends, will tell cabal to obey the include/link flags in the .pc file
<clever>
yeah
<clever>
cabal2nix doesnt have to do anything special with c-sources, thats entirely handled by cabal at build-time
<clever>
c-sources is wrappers included with the haskell source, that do things like implement something haskell cant do, and haskell then ffi's into it
<clever>
pkg-config is pre-installed stuff to find using pkgconfig
<clever>
thats for when you have c code in the same project as the haskell, and it should build both at once
<clever>
your shell.nix opens the .env automatically
<clever>
all haskell packages have a .env attribute, that is for use with nix-shell
<clever>
iqubic: it will load the given file, and return the top-level value in that file
<clever>
iqubic: you want callPackage ./foo.nix {} as well
<clever>
iqubic: it will import the given file, then use functionArgs to query what args it accepts, then give it those args, from the set callPackage came from
<clever>
> builtins.functionArgs ({ a, b ? 5 }: a + b)
<clever>
it will then make all the deps of that derivation exist (downloading and/or building), and set the env vars from the derivation
<clever>
iqubic: nix-shell will load either shell.nix or default.nix, in either case, the file it loads must return a derivation (or a set, when using -A)
<clever>
iqubic: it will read the derivation that the default.nix returns, make sure all the deps of that derivation exist in /nix/store/, and then set the env vars in the derivation
<clever>
iqubic: so you can just `runhaskell Setup.hs configure` or `ghcid -c "runhaskell Setup.hs repl"`
<clever>
iqubic: `runhaskell Setup.hs` == cabal
<clever>
CMCDragonkai: was already thinking about that, after i noticed curses in the comments
<clever>
CMCDragonkai: nix-shell sets up the same env vars that nix-build would have been using to do the build, so you can always access the src it would have been building
<clever>
CMCDragonkai: and running nix-shell on the .drv will point $src to it, and the genericBuild function will unpack that source for you
<clever>
CMCDragonkai: the .drv depends on the source, so it must exist in /nix/store/
<clever>
fresheyeball: also, you can replace `{ gitignore = gitignore; }` with `{ inherit gitignore; }`
<clever>
CMCDragonkai: most of the time, you can also skip the -K, and just reproduce the failure in nix-shell, but it depends on whats failing, and if you want to wait for another build
<clever>
fresheyeball: so you want `--arg pkgs 'import ./pkgs.nix'`
<clever>
fresheyeball: pkgs.nix doesnt accept any arguments
<clever>
ah, there
<clever>
CMCDragonkai: and you can ignore env-vars
<clever>
CMCDragonkai: you can use nix-shell to open the right shell, then cd into the dir left-behind from nix-build -K
<clever>
fresheyeball: and pkgs.nix?
<clever>
CMCDragonkai: your missing the entire stdenv
<clever>
CMCDragonkai: 2019-01-22 22:14:21 < clever> also, i open the shell for this, by running `nix-shell /nix/store/foo.drv` on the drv that failed to build
<clever>
CMCDragonkai: that will run any preCheck and postCheck hooks that may have been set
<clever>
can you pastebin both mything.nix and pkgs.nix?
<clever>
i think you want -A mything ?
<clever>
fresheyeball: oh, i see the problem 'nix-build mything' told it to open a file called mything, rather then default.nix
<clever>
but it would be better to just have a default, { pkgs ? import ./pkgs.nix {} }:
<clever>
oh wait, what you gave might work...., if pkgs.nix accepts an empty set
<clever>
and you must use -E if its an expression
<clever>
you must pass it the pkgs if it lacks a default
<clever>
ilya-fedin: i think thats entirely a .override for licenseAccepted
<clever>
and env vars can be set system wide
<clever>
the unfree error tells you the env var
<clever>
ilya-fedin: a: put all overrides in /etc/nix/nixpkgs-config.nix, b: make a config.nix for all users, c: there is an env var to allow unfree
<clever>
either put the override into /etc/nix/nixpkgs-config.nix or just delete /etc/nix/nixpkgs-config.nix
<clever>
ilya-fedin: /etc/nix/nixpkgs-config.nix has priority, and makes nixpkgs ignore all other config.nix files
<clever>
what files does this find? ls -lh $NIXPKGS_CONFIG ~/.config/nixpkgs/config.nix ~/.nixpkgs/config.nix
<clever>
ilya-fedin: you want pkgs.lib which comes from `packageOverrides = pkgs: ...`
<clever>
ilya-fedin: what files does this find?
<clever>
ls -lh $NIXPKGS_CONFIG ~/.config/nixpkgs/config.nix ~/.nixpkgs/config.nix
<clever>
ilya-fedin: and why does line 1 have stdenv, ... in it?
<clever>
ilya-fedin: what path did you put that config.nix at?
<clever>
r5d: it can automate the testing, but ive never used that mode
<clever>
if the crash isnt easy to trigger, then things get a lot harder to bisect
<clever>
r5d: you would need to boot windows, using the qemu it just built, and try to crash it again
<clever>
git will then check revs out for you, and just keep building, testing, and saying if its good or bad
<clever>
then checkout the bad rev, build, confirm its bad, and `git bisect bad`
<clever>
r5d: clone nixpkgs, checkout the nixpkgs rev you know works, nix-build -A qemu, ./result/bin/qemu ..., and once you confirm its good, `git bisect good`
<clever>
r5d: one trick, is to use a bisect in nixpkgs
<clever>
ivegotasthma: its possible that packages.html isnt set to recurse into nodePackages
<clever>
nix-repl> nodePackages.node2nix
<clever>
seqizz: but sometimes you can: (pkgs.callPackage ./foo.nix {}).buildInputs
<clever>
seqizz: if it was returning a set, yeah, but if its a chunk of code that calls a function, its more ocmplex
<clever>
to run that script
<clever>
dgarzon: in this case, line 94-96 will // a set of utils onto the main shell env, so i can nix-shell -A fixStylishHaskell
<clever>
fresheyeball: any nix-env or nixos-rebuild generate, that is older then 2 weeks
<clever>
it is truely random, let me grab the source
<clever>
simpson: one sec
<clever>
the root says "never delete this thing"
<clever>
fresheyeball: garbage collector roots
<clever>
using --max-freed to stop it from deleting ALL garbage is the only solution
<clever>
un-rooteded stuff (nix-shell) is still at risk
<clever>
after removing roots, it will then remove garbage in /nix/store in a random order
<clever>
--delete-older-than only controls what roots it will delete
<clever>
xourt: probably need to add libclang to inpuits
<clever>
,locate Decl.h
<clever>
the tools for generating such a tar also include a dummy nix db "dump", that you can then restore, so the closure in the tar is "valid"
<clever>
nh2: if you can build nix on a riscv nixos, you can just tar up the closure of it
<clever>
its basically a custom distro, heavily modeled on nixos (and borrowing some nixos modules), but uses runit rather then systemd, and a large amount of junk is missing
<clever>
ingenieroariel: on x86, it compiles down to a 40mb squashfs, which contains the entire rootfs
<clever>
ingenieroariel: i think systemd depends on kexec
<clever>
__monty__: nice
<clever>
if it is a dir, then i believe it will open default.nix in that dir
<clever>
and the file on the cmdline, can either be a file like foo.nix, a dir like ./bar/ or ., or a search path like <nixpkgs> (and quote it to stop bash)
<clever>
* default.nix
<clever>
* shell.nix
<clever>
* the file given on the cmd line (if present)
<clever>
for nix-shell, it will try to load things in this order:
<clever>
__monty__: only nix run uses that type of syntax
<clever>
it accepts the "path" to a default.nix to load
<clever>
__monty__: then tell it to open nixpkgs, nix-shell '<nixpkgs>' -A hello
<clever>
either kvm-amd or kvm-intel
<clever>
you need to modprobe the kvm driver for your cpu
<clever>
and yeah, it will just fail due to a missing /dev/kvm if you force that
<clever>
jonge: the syntax is just `system-features = kvm nixos-test` i think
<clever>
gchristensen: yeah, i saw the release notes somewhere
<clever>
jonge: is it happening with build slaves, or local builds?
2019-01-21
<clever>
laas: src = ./.; or src = /home/clever/apps/foo;
<clever>
Denommus: i think its just as simple as deleting ~/.nix-profile and /nix/
<clever>
Denommus: depends on if you did a single or multiuser install, but why do you want to remove it?
<clever>
aleph-: poking around with tab completion in `nix repl '<nixpkgs>'` found pythonPackages.buildPythonPackage
<clever>
aleph-: what error does it give?
<clever>
aleph-: does it give aaaaaaaany error when you run that?
<clever>
send the logs elsewhere
<clever>
the logs in the current dir, made ./. explode
<clever>
oh
<clever>
so the bad_alloc must be coming from elsewhere
<clever>
fresheyeball: the only places nix can throw bad_alloc is in the evaluator, but nix-daemon never evals nix
<clever>
lokado: and it should allow a login
<clever>
lokado: nixos-install will ask for a root pw when the install is finished