<bqv[m]>
oh, well, i can bump that number, that was just a soft cap because i can't think of a neat way to lazily evaluate strings
<bqv[m]>
so that first computation has to at least be done
<immae>
bqv[m]: is the evaluation lazy in the context of overlays?
<morgrimm>
Maybe this is a nix question and not specifically nixos question, but I built a quick derivation to pull down asdf-vm, and I'm testing it. It's failing because there's a hash mismatch in the nix-build-source derivation
<bqv[m]>
the values are
<bqv[m]>
the keys are not
<morgrimm>
Has anyone seen that before?
justan0theruser has joined #nixos
<immae>
I may miss some subtelty, but why not making a function `pr 1234` rather than generating them all?
<b42>
you can obtain it with nix-prefetch-github, or
<b42>
,tofu
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected. See: tofu-vim
thc202 has quit [Ping timeout: 260 seconds]
vykook has joined #nixos
cosimone has joined #nixos
<morgrimm>
nix-prefetch github?
never_released has quit [Ping timeout: 256 seconds]
work_ has quit [Quit: Connection closed for inactivity]
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morgrimm>
Is there anything special I have to do to make GH sources just... available? i.e if I want to pull down a repo, and then just reference it somewhere else as a package in another expression
<morgrimm>
Do I have to specifically copy source from the builder into $out?
vykook has quit [Ping timeout: 258 seconds]
<b42>
morgrimm: fetchFromGitHub { ... } is a derivation, building it results in /nix/store path ... so I'd say no you don't have to
<evanjs>
yeesh, does anybody actually use 0000000000000000000000000000000000000000000000000000 over e.g. lib.fakeSha256Hash? :P
<b42>
you just need to pass the expression to "somewhere else", possibly as a function argument
<cole-h>
evanjs: I do :P
<evanjs>
y tho haha
<cole-h>
,tofu-vim is shorter than lib.fakeSha256
<{^_^}>
is shorter than lib.fakeSha256: <esc>52i0<esc>
<energizer>
evanjs: i have an editor snippet that inserts a dummy hash
maddo has quit [Quit: See ya]
<evanjs>
okay well for those that don't :P
<{^_^}>
[nixpkgs] @magnetophon opened pull request #84302 → ninjas2: init at 0.2.0 → https://git.io/Jvbpi
<{^_^}>
[nixos-homepage] @dependabot[bot] pushed to dependabot/npm_and_yarn/packages-explorer/acorn-6.4.1 « Bump acorn from 6.1.1 to 6.4.1 in /packages-explorer »: https://git.io/JvbpP
<{^_^}>
[nixos-homepage] @dependabot[bot] opened pull request #382 → Bump acorn from 6.1.1 to 6.4.1 in /packages-explorer → https://git.io/JvbpX
<cole-h>
oof
<morgrimm>
b42: yeah, all my custom derivations end up in another pkg set I pass around with my config
<morgrimm>
Or, that's the idea, anyway >.>
mexisme has joined #nixos
<morgrimm>
Evaluating that expression will assign the store path as the return value, right?
<morgrimm>
I'm still kinda learning Nix and the ecosystem, so
<DigitalKiwi>
davidak[m]: so i was closing tabs from the other day and i noticed on this one it had that pin out i described and calls it rollover http://www.prsol.com/cpd.html
psy3497_ has joined #nixos
psy3497_ has quit [Client Quit]
<DigitalKiwi>
davidak[m]: at the end of the page before the last diagram
<bgamari>
How does one depend upon cmake without running the setup hook?
<DigitalKiwi>
davidak[m]: so now i know what words to use to search for
<bgamari>
I have a python package which uses a setuptools setup.py script to build a C extension via cmake
psy3497_ has joined #nixos
psy3497_ has quit [Client Quit]
<bgamari>
but if I depend upon cmake via nativeBuildInputs the package is treated as though it has a cmake build system
<cole-h>
What about normal `buildInputs`?
<bgamari>
cole-h, then the cmake executable isn't in PATH
<bgamari>
dontUseCmakeConfigure = true; appears to be the prescription
<mlatus[m]>
nix manual only explains the `derivation` , while most of time we are actually using `stdenv.mkDerivation`, which has heavy abstractions build upon `dervition`. Which IMHO is confusing for new comers
<srhb>
mlatus[m]: mkDerivation isn't fundamental to Nix, but is for nixpkgs, so it's documented in the nixpkgs manual, not the nix one.
<srhb>
(And this split of manuals is also confusing to newcomers)
<mlatus[m]>
srhb: sure, but I feel like there should be a chapter describing the `standard library`.
<srhb>
mlatus[m]: In the nix manual? I think that would be confusing too, since standard Nix doesn't have stdenv.
jmeredith has joined #nixos
drakonis has quit [Quit: WeeChat 2.7.1]
<mlatus[m]>
IDK, but now the "Learn" page list them togather, which may be better
<srhb>
mlatus[m]: I think there are too main categories of reasons to reach the nix manual. 1) you're implementing something like nixpkgs, and 2) you want to configure nix for use with nixpkgs. I've seen both cases in the world, but the latter is way more common. Perhaps a pointer near derivation (note: this is not mkDerivation from nixpkgs, which is likely to be what you want to use, if you're already
<srhb>
using nixpkgs) or something like that.
<mlatus[m]>
srhb: that's what I mean "a link in the top level". people should be quickly notified what they actually need
<colemickens>
followed by the gnupg command still says no pinentry
<colemickens>
even if I restart gpg-agent
<colemickens>
I really hate gpg
<colemickens>
I think it might be:
<colemickens>
kill gpg-agent
<colemickens>
run gpg command
<colemickens>
it's started by not-user systemd
<colemickens>
because after all that, I just did a sudo pkill gpg-agent; systemctl --user restart gpg-agent; and now it works even without prompting me for a pin..
<colemickens>
which is also, just weird.
zaeph1 has joined #nixos
<pjt_014>
s1341: Most of the people that can are scrambling to get the 20.03 release ready, it'll depend on who's awake/not busy.
<pjt_014>
It might have to be after the release
<s1341>
pjt_014: ok. wasn't aware that a release was in the works...
zaeph has quit [Ping timeout: 260 seconds]
<pjt_014>
Yeah. Last release was october. we're due
<ZaraChimera>
Not quite sure what I borked in the first attempt.
<pjt_014>
oh, neat. You have any idea why the sass occurred?
<pjt_014>
Hm. Mystery. Fun.
<pjt_014>
Is it working fine every time you open up the wsl?
<pjt_014>
last time I tried using it I had the weirdest problem
<ZaraChimera>
I can only think that something I did borked the CA certs stuff. But I am not really sure. I uninstalled and reinstalled opensuse WSL and then added the nix.conf to work around known bugs (disable sandbox and sqlite-wal) and then ran the curl command with no issues.
captjakk has joined #nixos
zebrag has joined #nixos
<ZaraChimera>
nix is slow, but it works anytime I open WSL of any version.
<pjt_014>
And nix commands work fine every time you open it?
<ZaraChimera>
I think nix-env -i is compiling when I run it rather than pulling a binary.
<ZaraChimera>
So far commands like nix-instantiate, nix-env, nix-channel all work. I have not tried nix-shell yet.
<pjt_014>
When I had it installed, It lost the location of the store every time the wsl opened. I had to do 'source ?' (dont remember what) every time I opened it
<pjt_014>
and I had to do it manually
<pjt_014>
it never worked automated or even in a scrpit
<ZaraChimera>
I have not encountered that one yet.
<pjt_014>
had to type it every time
<ZaraChimera>
nix-env commands take a while to execute, but they do work.
<pjt_014>
Yeah, MS's impl of symlinks apparently suck all kinds of ass.
<Bunogi>
What do I do if nix tells me that a NAR info file is corrupt?
captjakk has quit [Ping timeout: 260 seconds]
<ZaraChimera>
Well, I at least have a nix environment to play around in without needing to have a second computer.
Heirlung has quit [Read error: Connection reset by peer]
Heirlung- has joined #nixos
<pjt_014>
-r / --realise should redownload the file if it's corrupt.
<pjt_014>
ZaraChimera: you could dual-boot
<pjt_014>
If speed is ever desired over convnince
Heirlung- is now known as Heirlung
sogatori has joined #nixos
o1lo01ol1o has joined #nixos
<Bunogi>
pjt_014: I ran `nix-store -r /nix/store/vyr93....narinfo` but there's no file with that name. It gave me the same error. I used find to look for the file in /nix but it's not there
<Bunogi>
Accidentally made infinite recursion in my configuration.nix yesterday which caused me to run out of memory, freezing my computer when I ran nixos-rebuild switch so that probably has something to do with it
<pjt_014>
Oof.
<pjt_014>
Memory or disk space?
<Bunogi>
Yeah RAM, had to do a hard reset
cole-h has quit [Quit: Goodbye]
<ZaraChimera>
pjt_014 I will probably dualboot at some point once I know my way around NixOS enough. Or I may wait till I upgrade the main computer and use the older hardware for the NixOS system for something. Possibly personal hybrid server-desktop setup or something.
morgrimm has joined #nixos
<pjt_014>
ZaraChimera: yeah. My 1st setup was just like 3 VMs for messing with stuff, then a VPS (still have), and now it's on two desktops and two rPis
mexisme has quit [Ping timeout: 272 seconds]
<pjt_014>
Bunogi: when do you get the error? boot? login? something else?
o1lo01ol1o has quit [Ping timeout: 265 seconds]
<Bunogi>
pjt_014: Running nixos-rebuild
<ZaraChimera>
After having had a couple of NixOS installs I kind of lost patience with FHS issues.
<ZaraChimera>
Also NixOS's approach could be well suited to an audio setup.
<pjt_014>
Bunogi: one other thing: nix-store --repair
<pjt_014>
would take awhile (see the man page) but it would redownload the path
jakobrs has joined #nixos
<Bunogi>
pjt_014: I was able to complete the rebuild on the old generation, didn't think that would work, because the issue was in the store but it did! Thanks for the help and advice
linarcx has quit [Ping timeout: 256 seconds]
<jakobrs>
How could I get the nix-index database from a cache?
<pjt_014>
Bunogi: np :)
<pjt_014>
jakobrs: nix-index --database /path/to/it, If I understand your question
<pjt_014>
wait, --db, I misread
<jakobrs>
I mean, my computer almost runs out of resources if I run nix-index
<jakobrs>
So I'm looking for a cached database download
<jakobrs>
IF that makes sense
<pjt_014>
Like one someone else made?
<jakobrs>
Yeah? Someone mentioned a link here sometime ago
<pjt_014>
It's your system, that someone would need access to do it. nix-index is like the mlocate command, it builds a database of what it sees on your system only.
<pjt_014>
what you *can* do is give it just enough to run correctly once
<pjt_014>
you'd only need to do it again rarely-ish
<pjt_014>
I take it memory is what's running dry?
<jakobrs>
probably
<jakobrs>
fwiw I found the link that I was thinking of
<pjt_014>
jakobrs: there are afew things you can do here. 1st: prefix your commands with a timeout
kleisli has quit [Remote host closed the connection]
<pjt_014>
that way you know you'll get control back even if your gui is unresponsive
kleisli has joined #nixos
<pjt_014>
next: the 'nice' command may be of use
<jakobrs>
Yeah ik
<pjt_014>
nice -n 1 will lover the priority of whatever it's in front of, make it lower than important things like a gui environment
<pjt_014>
oh
<pjt_014>
didnt know soz
<jakobrs>
I'm probably going to look into a better computer in the future
<pjt_014>
long term, sure
<pjt_014>
two other things I can think of now
<jakobrs>
I mean, this machine has 4GB RAM and i5-6200U
<jakobrs>
So it's not "terrible" but it's not great either
<pjt_014>
I had 400mb of ram in my main machine for like 5 years
<energizer>
what decade was that?
<pjt_014>
2010s
<energizer>
whoa
<pjt_014>
yup
<pjt_014>
windows too :/
<energizer>
the other tricks you were gonna mention?
<pjt_014>
one, making the cache as small as possible sidesteps the problem
<pjt_014>
collecting garbage, optimizing the store
<pjt_014>
less to index, more chance of it working
<energizer>
which cache?
<energizer>
you mean the nix store?
<pjt_014>
yeah. nix-collect-garbage
<pjt_014>
sorry shoulda said store first
<jakobrs>
Maybe Hydra could build an index automatically?
<jakobrs>
I mean, that way you could get near-full coverage of the entirety of nixpkgs
<energizer>
there's also ulimit, and then i think the actual solution is cgroups v2 but i havent set that up on my system yet
<pjt_014>
That's an interesting idea, but it wouldn't work as-is. The nix-index is one file for your WHOLE store. What you're describing sounds like it'd need per-derivation indexes that get merged into you main one upon installing
<jakobrs>
yes
<pjt_014>
and removed once sonething is uninstalled to keep space efficiency
<pjt_014>
possibly with a bloom filter or some cool shit
<jakobrs>
(presumably with modifications to Hydra), when the relevant jobset is combined, it would create a full index of that particular revision of Nixpkgs
<jakobrs>
s/combined/built/
<jakobrs>
So you'd have an up-to-date nix-index database that's updated in parallel with nix-channel --update
<pjt_014>
I'd still imagine it being per-package, since you aren't typically installing all of nixpkgs, also because some people wouldn't need it or be able to afford the space
Naptra has joined #nixos
<pjt_014>
like on my rpi0 with its 16gb card
<pjt_014>
git is good at smart merging, it could probably do this
<jakobrs>
Yeah maybe not everybody could afford the space
<pjt_014>
yup. anyway, make your store as small as possible. nix-env --delete-generations +x for example will delete all but your most reccent x gens
<jakobrs>
But having the ability to download automatically-built cached per-package nix-index databases would be cool
<pjt_014>
might be yeah
snicket has joined #nixos
<LnL>
FYI channels already contain a package index, but it's not a full file index like what nix-index does
<pjt_014>
after running that ^ cmd, nix-collect-garbage will eat up much more
<srk>
redundant a bit as you have tiling in tiling and need better bidings :)
<energizer>
pjt_014: no
<jakobrs>
pjt_014: the point is that even if plasma crashes, tmux continues running
<pjt_014>
that's what mine does too
<pjt_014>
dvtm is a muxer
<energizer>
pjt_014: there is no noticeable latency in the wm
<pjt_014>
nvm
<Orbstheorem>
srk: what's weird with tmux and xmonad?
captjakk has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @euank opened pull request #84325 → k3s: init at 1.17.3+k3s1 → https://git.io/JvNYf
<pjt_014>
wrong oncversation
captjakk has joined #nixos
<srk>
Orbstheorem: redundant a bit as you have tiling in tiling and need better bidings :)
<Orbstheorem>
I happily used a not-so-trivial xmonad + taffybar + tmux for some time
captjakk has quit [Remote host closed the connection]
<Orbstheorem>
srk: I wouldn't say so, but I guess it depends on your workflow: I usually start working in my scratchpad and when things start to scale I promote the tmux window to its own terminal window and workspace
captjakk has joined #nixos
<srk>
Orbstheorem: how do you move between windows in xmonad vs tmux?
kenran has quit [Ping timeout: 256 seconds]
<Orbstheorem>
Also, I like managing my terminal sessions and windows independently since I organise terminals by topic and fork very often to check something quick, such a repl or an isolated experiment
<energizer>
Orbstheorem: fork?
<Orbstheorem>
I use ^q as tmux prefix and m4+{hjkl} for my windows
<srk>
that's what I find confusing - having to set of ways to navigate windows
<srk>
s/ways/keys/
<Orbstheorem>
Fork as in spawn a new terminal window to do a quick experiment and the close it (or not) and go back to my main focus (editor/command/...)
<jakobrs>
slightly unrelated, but
<jakobrs>
zsh default is bindkey --emacs, right
<energizer>
yes
<jakobrs>
s/$/?/
<jakobrs>
Then why do I have to manually add it to .zshrc on NixOS?
<Orbstheorem>
srk: I guess I would have this either way. If I wasn't using tmux, but only Windows I would group my terminals in a sublayout and use different keys to come across them
<jakobrs>
On nixos, the default seems to be --vim for some reason
captjakk has quit [Ping timeout: 265 seconds]
<Orbstheorem>
jakobrs: this doesn't answer your question, but personally I ended up adding tons of emacs shortcuts to my vim, zsh and tmux configuration :D
<jakobrs>
> emacs shortcuts to my vim [...]
<{^_^}>
error: syntax error, unexpected ELLIPSIS, at (string):293:28
<jakobrs>
blasphemy
<energizer>
Orbstheorem: do you have a list of the zsh ones?
<yourfate>
so, I want to migrate 2 web apps to a nixos machine, right now one is running on one server using docker, the other is installed natively on another machine
<yourfate>
they'd be served on different subdomains
<yourfate>
now I'm not sure if I want to keep using docker
<jakobrs>
Do I need to do anything to get bittorrent/transmission-gtk to work on nixos? seeding specifically
<mlatus[m]>
When provided, this is the expected hash of the file at the path. Evaluation will fail if the hash is incorrect, and providing a hash allows builtins.path to be used even when the pure-eval nix config option is on.
<gchristensen>
for example, this works: nix-instantiate --option restrict-eval true -E '(import <nixpkgs> {}).hello' -I nixpkgs=/nix/store/04ck4nckra6933g5r0ffy1m452zvh4ij-nixos-20.03beta874.b0c285807d6/nixos
<mlatus[m]>
this is doc of builtins.path
<mlatus[m]>
but can't figure out how
<jakobrs>
I figure I might need to open a port in the firewall?
<Orbstheorem>
Hi o/ How can I have an attrset run a function upon lookup? I would like to access a set like so: `foo.bar`, and have a function evaluated with argument `bar` (since at the time of writing the function I don't know the argument domain). I'm doubting this is possible (since it would break `with foo; ...`), but I'm not sure ^^
<jakobrs>
oh nvm it seems to be working now
nomeata has joined #nixos
<bqv[m]>
you could test that by setting networking.firewall.enable = false; temporarily
<bqv[m]>
gchristensen: is there a route to the nixos configuration from pkgs?
<gchristensen>
no, nixpkgs doesn't really know about NixOS
jbrock has joined #nixos
<bqv[m]>
is there any other way i can access "nixos-rebuild" from pkgs?
<bqv[m]>
the package doesn't seem to be exposed through pkgs
<gchristensen>
heh, yeah, I don't know :/
<bqv[m]>
hmm, ok, ty anyway
romildo has joined #nixos
<gchristensen>
mlatus[m]: this works for me: nix-instantiate --option pure-eval true --eval -E 'builtins.path { path = ./test.nix; sha256 = "4d1024a134b9ea6fbf122c8c59262886478085dbbaefe1391c6838c6bf8c685f"; }'
<romildo>
How can set attribute names be listed in a derivation, for debugging purpose?
opthomasprime has quit [Remote host closed the connection]
tjg1 has quit [Quit: i sincerely apologise for any civil disobedience caused]
<bqv[m]>
surely it's allowed on anything that's within the pure scope
<benny>
now that hydra is being very slow to advance the unstable channel I'm convinced to switch to 20.03 and then just pull the few packages where I want the latest from unstable
<gchristensen>
you can actually, ofborg automatically builds every PR for aarch64-linux and x86_64-linux if you follothe "attributename: commit message" format
<gchristensen>
ah then it probably would have started them, not sure
chpatrick has quit [Quit: Connection closed for inactivity]
morgrimm has quit [Ping timeout: 240 seconds]
<ij>
I think someone answered this a couple of years ago, but I forgot...
<ij>
why can't xorriso find the files that I want to include in my nixos iso when building it? I added it with isoImage = { contents = [ {source = "/home/addable-file"; target = "/home/addable-file"; } ] };
<ij>
xorriso : FAILURE : Cannot determine attributes of source file '/home/images/test-file' : No such file or directory
<ij>
/home/images is rwxr-xr-x
<gchristensen>
your source there is justa string, you need to actually pass a path: source = /home/addable-file
<gchristensen>
as a string, the Nix build is isolated and sandboxed and can't access anything but paths that were provided
<ij>
it's a huge file, can I move it to /nix/store? dirty, but making isos is a dirty business
<MichaelRaskin>
And passing it as a path copies the file into the Nix store where the build can access it
<ij>
it's a smaller copy of my /home
<ij>
as a giant, encrypted loop-mountable file
<MichaelRaskin>
If you pass a path without quotes, it will be copied to the store automatically and the path to the copy passed to the actual build command
<ij>
hm, fine... I'll try that
erictapen has quit [Ping timeout: 256 seconds]
<chloekek>
The Nix installer does not work when run as root. So I would create a new user, run the installation script, and then delete that user. Does deleting that user cause problems with Nix later on?
<Orbstheorem>
Does anybody have a nix expression for `isPrefixOf`?
<bqv[m]>
urgh, restricted mode means my server's config doesn't even build at the moment
ambroisie has joined #nixos
mallox has quit [Quit: WeeChat 2.7.1]
mallox has joined #nixos
chagra has quit [Ping timeout: 256 seconds]
mallox has quit [Client Quit]
<kraem>
MichaelRaskin: regarding passing a file as a path or string; if passing the file as a string isn't saving it in the nix-store, can one read secrets with strings (and not save them in the nix-store), or is the value of the varaibles saved in the nix-store either way?
chagra has joined #nixos
<MichaelRaskin>
Derivations are saved in the Nix store
<MichaelRaskin>
So whatever is available in the build is world-readable
chagra_ has joined #nixos
<kraem>
ok thanks
jakobrs has quit [Ping timeout: 256 seconds]
<bqv[m]>
so i do a somewhat extraordinarily hacky thing on one of my machines to only add to haproxy ssl certificats that already exist on disk, to get around the fact that half the time the acme module doesn't even generate them in time so the configuration fails to run. Anyone got any ideas on a smarter way to do that?
<jluttine>
"stack new myproject" fails: error: attribute 'ghc843' missing, at (string):1:43
chagra has quit [Ping timeout: 258 seconds]
<jluttine>
i'm in "nix-shell -p stack"
ambroisie has quit [Ping timeout: 265 seconds]
<jluttine>
or what is the correct way of creating a haskell project in nixos.. i'm new to haskell.
<clever>
jluttine: personally, i just avoid stack and `cabal new-build` like the modern plague :P
<clever>
jluttine: use pkgs.haskellPackages.callCabal2nix and plain old `cabal build` (via `runHaskell Setup.hs build`)
<munksgaard>
I would like to install elm-format through npm, so I have a shell.nix with `buildInputs = [ nodejs-12_x ]` but after running npm install elm-format within, it seems like the installed elm-format links to libgmp, which it cannot find, not even if I add gmp to the buildInputs. Any idea what could be wrong?
<clever>
jluttine: this for example, returns a set containing all haskell packages, plus 2 extra
<jluttine>
clever: cabal is broken too.. `nix-shell -p haskellPackages.cabal` fails
<clever>
jluttine: haskellPackages.cabal is the cabal library, not the cabal binary
<clever>
jluttine: you want cabal-install
<bqv[m]>
nix being case-sensitive is the most frustrating thing. looking at the code you'd think security.acme.preliminarySelfSigned was an option
<bqv[m]>
guess what? that last S shouldn't be capital
<jluttine>
clever: ok. i guess there aren't really instructions for this in any nixos docs
<bqv[m]>
could anyone write a quick PR to make an alias with more healthy capitalization? every time I try and figure out how aliases work I break things
<clever>
jluttine: the haskell stuff would be in the nixpkgs docs, not the nixos docs
<munksgaard>
clever: Okay, I'm not sure how that works. `patchelf --add-needed libgmp.so.10 /path/to/elm-format` didn't seem to do much
<clever>
munksgaard: its already in the DT_NEEDED field, you must set the rpath
CptCaptain has quit [Ping timeout: 265 seconds]
levdub has quit [Ping timeout: 256 seconds]
<munksgaard>
clever: `patchelf --set-rpath /nix/store/h5j89q8sf64079zgwqg4fqmw7hfzq43z-gmp-6.2.0/lib /path/to/elm-format` doesn't seem to do much of anything either
<clever>
munksgaard: this env var tells you where it is
<clever>
munksgaard: so, you want to add `--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker)` to the cmd
fendor has quit [Ping timeout: 265 seconds]
<munksgaard>
clever: That seemed to do something. `file` now points to the new interpreter, though ldd still can't seem to find libgmp. However, trying to run the executable gives this error: /home/munksgaard/src/willoughby/node_modules/elm-format/unpacked_bin/elm-format: error while loading shared libraries: libgmp.so.10: wrong ELF class: ELFCLASS32
<clever>
munksgaard: you gave it a 32bit gmp, not a 64bit gmp
philr has quit [Ping timeout: 256 seconds]
<clever>
/nix/store/h5j89q8sf64079zgwqg4fqmw7hfzq43z-gmp-6.2.0/lib/libgmp.so.10.4.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
<clever>
munksgaard: file confirms that
<munksgaard>
Aha. I found the gmp file by doing `find /nix/store -name '*gmp.so.10'` and taking the first one, so it would make sense that I was unlucky... Any better way to find the correct version than just trying the different ones that pop up?
<clever>
munksgaard: ask nix for it, `nix-build '<nixpkgs>' -A gmp`
logand has joined #nixos
immae has quit [Quit: WeeChat 2.4]
work_ has joined #nixos
<munksgaard>
clever: That makes sense.
morgrimm has joined #nixos
reallymemorable has joined #nixos
<munksgaard>
clever: It works!
<munksgaard>
clever: Thanks :)
<clever>
munksgaard: when ran like that, nix will default to the same arch that nix-build itself was compiled with
<clever>
munksgaard: you may also want to use a shell.nix file with a shellHook, to patch things, since youll need to repeat that every time npm re-downloads the binary
<munksgaard>
clever: That sounds like a very good idea.
sogatori has quit [Remote host closed the connection]
<logand>
is there a way to set user home dir to readable instead of 0700?
<yourfate>
what is the normal place to put webroots in nixos? on my arch the websites were in /usr/share/nginx/html/
<clever>
munksgaard: this one is a bit complex, but the selected area will run `yarn install`, then overwrite several of the pre-compiled binaries with symlinks to pre-patched ones nix provides
<logand>
yourfate: in nix store
<jluttine>
ok.. i still don't understand how do i create a new haskell project.. i guess i would like to use stack as that has first-class support for nix
<clever>
yourfate: my prefered method is to point `services.nginx.virtualHosts.<name>.root` to a derivation, probably pkgs.runCommand, so everything is in the nix store
<clever>
jluttine: lines 5 and 6 load a machotool.cabal and a macho.cabal into nix, then you can just `nix-build -A machotool` to build it, or `nix-shell -A machotool.env` to get a shell with the deps
shibboleth has joined #nixos
<jluttine>
clever: hmm.. i need to crete these cabal files first i guess
<clever>
jluttine: `cabal init` can automate that i believe
<yourfate>
clever: so I'd have to create a package for that site?
<clever>
yourfate: yeah
<jluttine>
clever: yeah, and for that i need a nix shell with ghc and cabal-install..
<clever>
jluttine: yeah, i would use `nix-shell -p ghc cabal-install` for that first run
<jluttine>
clever: hmm! now this looks promising, got the compiler running, yey! thanks!
romildo has quit [Quit: Leaving]
<morgrimm>
nix-shell is so fuckin cool - I'm tempted to try and slide nix in at work to make local dev envs/CI builds less flaky
<clever>
morgrimm: do it!
<morgrimm>
I have to figure out a good solution for npm/python package reproducing, though. I haven't looked into any abstractions nixpkgs has for that
<morgrimm>
But we're a python/react shop, so that part pretty much makes or breaks it
<chloekek>
Ah, I found a solution. I can just install Nix in daemon mode as root by inserting this line into the installation script: sed -i 's/\[ \$EUID -eq 0 \]/false/' "$unpack"/*/install-multi-user
<chloekek>
It disables the root check and everything works. :)
<munksgaard>
clever: Thanks a lot
immae has joined #nixos
<clever>
chloekek: the problem, is that nix needs to modify the $HOME for a non-root user, and things may start to malfunction down the road if you bypass it
captjakk has joined #nixos
ambroisie has quit [Ping timeout: 256 seconds]
<morgrimm>
i.e. Pulling all python packages from our company twine/npm repos, etc. I don't want to have to manually override all python package derivations we need from nixpkgs :/
learnday20 has joined #nixos
<clever>
morgrimm: i think there is stuff in place, to take a requirements.txt and auto-generate the nix to do that
<learnday20>
I am trying to put xmonad.nix in /etc/nixos/configuration.nix file and its saying error: syntax error, unexpected WITH, at /etc/nixos/configuration.nix:163:2 what do i need to do? thank you!
<clever>
learnday20: what is the code around line 163?
<chloekek>
clever: Ideally I would have a minimal setup suitable to nix copy into, and run nix-collect-garbage from time to time
<chloekek>
No channels or profiles or anything user-specific.
<clever>
chloekek: yeah, then youll want to delete the channels after the install is done, though, nix itself must be in roots profile, or nix will try to delete nix
<munksgaard>
clever: Is there a way to use that `nix-build` think within a --pure shell? It's complaining that $NIX_PATH isn't set.
<clever>
munksgaard: i would just just run nix-build outside of the nix-shell
liminal18 has joined #nixos
<munksgaard>
clever: But then I can't put it into the shellHook, right?
<clever>
munksgaard: you can already build things in the shellHook
<clever>
munksgaard: patchelf --set-rpath ${gmp}/lib, will have nix build gmp, and insert the path for you
<munksgaard>
clever: I see
<learnday20>
hello clever: code on ln163 starts with with lib;
<monokrome>
has anyone got accurate power reporting to work w/ Purism laptops?
<monokrome>
like, whether charging or not
<clever>
learnday20: is the pastebin xmonad.nix or configuration.nix ?
zebrag has joined #nixos
evertedsphere has quit [Ping timeout: 264 seconds]
<learnday20>
clever: sorry it took me few minutes due to my not knowing, it is xmonad.nix i pasted, here is my configuration.nix with line 163, https://pastebin.com/ySpVvFab
<clever>
learnday20: yep, line 163 is the problem
<clever>
learnday20: line 7 is the start of an attribute set, which must only contain `key = expression;` pairs
<clever>
learnday20: line 163, `with lib;` is not a `key = expression;` pair
<{^_^}>
[nixpkgs] @dominikh opened pull request #84361 → luminance-hdr: use Qt5's mkDerivation → https://git.io/JvNWv
ym555 has joined #nixos
<morgrimm>
Is there ever a reason to use raw derivations over the wrappers for most derivations?
<morgrimm>
Like, I'm basically pulling src from GH and then copying it into $out, so I'm considering runCommand - but then, do I lose being able to set meta properties, test phases, etc if need be?
<morgrimm>
I tried mkDerivation, but setting builtInputs/buildPhase still expected the default builder to run, which isn't what I need
<clever>
morgrimm: the attrset that runCommand takes, can accept meta and other stuff
<clever>
morgrimm: and it can still run phases as well
<learnday20>
clever: ok, thanks for explaining that. so how can I add the xmonad.nix into configuration.nix as key = expression pairs?
<clever>
morgrimm: here, i use runCommand, i set patches, and then i run patchPhase to apply everything in patches
<clever>
learnday20: add `./xmonad.nix` to the imports list, and nixos will merge it in for you
gustavderdrache has joined #nixos
FRidh2 has joined #nixos
chagra has joined #nixos
<morgrimm>
Ahh, okay
FRidh has quit [Ping timeout: 265 seconds]
ddellacosta has joined #nixos
<morgrimm>
is the cmd passed to runCommand the build instructions?
<clever>
morgrimm: yeah
<mallox>
hi, how do I add a file to firefox's nix store path via configuration.nix: /nix/store/r80765q5pirwxy7q2nc45cm7p455i83z-firefox-unwrapped-74.0/lib/firefox/defaults? Thanks!
<morgrimm>
Beauty :)
<morgrimm>
Thanks clever
chagra_ has quit [Ping timeout: 260 seconds]
logzet has joined #nixos
ym555 has quit [Ping timeout: 256 seconds]
<learnday20>
hi clever: I added './xmonad.nix' in the import list and tried nixos-rebuild switch and it still gave me error on line 164 with the With, do i need to remove with lib? thank you
o1lo01ol1o has quit [Remote host closed the connection]
cole-h has joined #nixos
<morgrimm>
clever: using runCommand, is it still advised to use buildInputs/propogatedBuildInputs if my package depends on others? coreutils included?
ym555 has joined #nixos
<{^_^}>
[nixpkgs] @flokli pushed to master « Revert "nixos/hardened: build sandbox incompatible with namespaces" »: https://git.io/JvNWz
<clever>
morgrimm: propogatedBuildInputs only works right if you run the fixupPhase, buildInputs works normally
never_released_ has joined #nixos
o1lo01ol1o has joined #nixos
never_released has quit [Ping timeout: 260 seconds]
<morgrimm>
Alright - so if I depend on cp being available for example (although it seems coreutils already are with runCommand), should I still specify coreutils in the buildInputs?
<{^_^}>
[nixpkgs] @veprbl opened pull request #84362 → python3Packages.matplotlib: 3.1.3 -> 3.2.1, and various cleanups → https://git.io/JvNWV
<clever>
morgrimm: cp is part of the stdenv, and will always be available
KeiraT has quit [Remote host closed the connection]
reallymemorable has joined #nixos
leotaku has quit [Ping timeout: 264 seconds]
Amit[m] has joined #nixos
CptCaptain has joined #nixos
Rusty1 has joined #nixos
zupo has joined #nixos
<morgrimm>
If you need to link a binary to make it available in the env when building, how would I do that? Does the build env for a derivation have access to the profile's etc/bin directory somehow?
ym555 has joined #nixos
cosimone has joined #nixos
chagra has quit [Ping timeout: 258 seconds]
<morgrimm>
er, make it available *after* building
KeiraT has joined #nixos
chagra has joined #nixos
leotaku has joined #nixos
captjakk has quit [Ping timeout: 260 seconds]
arjen-jonathan has quit [Ping timeout: 260 seconds]
<arianvp>
It's really annoying that the nix installer conflates Daemon mode with Multi-User mode
<Izorkin>
aanderse: the last version of php-fpm doesn't work for me. Result ls -lah - srw-rw---- 1 root root 0 апр 5 19:03 test-01.sock
<arianvp>
I want to install nix as root on server so I can use ssh-ng but the installer aborts
nschoe has joined #nixos
<arianvp>
When I want to enable nix-daemon mode in instsller
<arianvp>
;/
<arianvp>
Using nix-daemon when there is just a single root user is still useful
<clever>
arianvp: you can always manually run the nix-daemon after you install it
<evertedsphere>
i have some sort of declarative nixops configuration that pins my system-wide nixpkgs
<evertedsphere>
i'd like to refer to the root path of the repo from within the nix files that it consists of
markus1189 has quit [Ping timeout: 256 seconds]
<evertedsphere>
something like <my-system-config/wallpaper.jpg> or whatever
markus1189 has joined #nixos
<evertedsphere>
i think just defining something like my-system-config = copyPathToStore ./. and then referring to relative paths as "${my-system-config}/wallpaper.jpg" might work?
<evertedsphere>
the other idea i had was putting an extra entry in nix.nixPath but that seemed to only "update" when i rebooted
<etu>
aanderse: With my PR I'll added tests for php-fpm with nginx as well :)
<etu>
aanderse: Which is nice :D
o1lo01ol1o has quit [Ping timeout: 265 seconds]
<aanderse>
Izorkin: i haven't looked in a couple months, i can't remember right now
<aanderse>
etu: very nice, much like the rest of that PR ^_^
knupfer has quit [Remote host closed the connection]
knupfer has joined #nixos
<vika_nezrimaya>
Hi there! Experimenting with making my NixOS system deployable from flakes, and I have some questions about the "--override-flake" flag. Let's say I have a type == "git" derivation that I want to replace for debugging with a local copy without modifying the flake.nix. How should I write the first argument? The obvious "git+https://gitlab.com/vikanezrimaya/reponame.git" doesn't seem to do anything. Is it only working for github: style
<vika_nezrimaya>
flake registry entries?...
asbachb has joined #nixos
CptCaptain has quit [Ping timeout: 265 seconds]
levdub has joined #nixos
<{^_^}>
[nixpkgs] @teto pushed to structured-attrs « Use env. for environment variables »: https://git.io/JvN8P
<asbachb>
Hej. What's up with nixpkgs-unstable? Seems that it wasn't updated since some time.
<evertedsphere>
how do i interpolate variables in things i read with builtins.readFile?
<evertedsphere>
like if i have a file which contains an "${pkgs.foo}/whatever" and i want to interpolate it as if it were inside a normal "..." or ''...'' block
<vika_nezrimaya>
asbachb: if it wasn't updated in some time, it might be a sign that someone commited something that breaks Hydra channel builds. If Hydra fails the job, the unstable channel (or any channel) doesn't advance.
igghibu has joined #nixos
<{^_^}>
[nixpkgs] @globin pushed 13 commits to structured-attrs: https://git.io/JvN4v
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #nixos
<vika_nezrimaya>
Also might be a sign that people have nothing more to do on self-isolation than push to Nixpkgs, which is good - except Hydra might not have been able to keep up with their pace :3
igghibu has quit [Client Quit]
<vika_nezrimaya>
asbachb: I see a lot of jobs marked as "queued" in nixpkgs:trunk jobset on hydra.nixos.org, probably people are pushing lots of new cool stuff
<vika_nezrimaya>
lots of queued jobs means that people are commiting lots of stuff
<vika_nezrimaya>
it's not exactly proportional to stuff commited, one small change in glibc could lead to whole nixpkgs rebuild (but these changes are usually kept in staging to prevent this exact situation from occuring due to mass rebuilds)
<hpfr[m]>
the virt-manager package has a build input `spice-gtk ? null`. Do I override it like this? `super.virt-manager.override { spice-gtk = super.spice-gtk; };` When I do that and rebuild NixOS, virt-manager doesn't start compiling, which I expected. and the bug I'm having still appears
<clever>
you can also get small 1 line changes, that entirely grind a channel to a halt
<vika_nezrimaya>
clever: k3s is in Nixpkgs now?! YAY
<clever>
vika_nezrimaya: k3s entirely broke all unstable channels
<vika_nezrimaya>
oops
<vika_nezrimaya>
why so
<clever>
vika_nezrimaya: so no user will actually see k3s!
<clever>
evaluation aborted with the following error message: 'Illegal use of <nixpkgs> in Nixpkgs.'
<asbachb>
clever: But it got merged today? From my understanding the last nixpkgs-unstable update was 8 days before?
<clever>
asbachb: it may not be the problem that has been going for the last 8 days, but it is one of the problems in the latest eval
<aanderse>
Izorkin: i understand. phpfpm is documented to work with systemd sockets so I'll try to get that working properly still. if that can't work your solution is good still.
<evertedsphere>
this is, like, a script being called from the home-manager polybar module
<vika_nezrimaya>
then why do you use nix-shell there?
<vika_nezrimaya>
you can just set up the PATH in Environment or hardcode paths to nix store using ${package} constructs
<evertedsphere>
just because i don't want any of the script's dependencies in my user env if i don't need them. but like i said i can't make it execute with /usr/bin/env bash either
<evertedsphere>
wait can i do ${pkgs.foo} even if foo is not installed?
<vika_nezrimaya>
yep!
<evertedsphere>
wil lit automatically build the foo store path and everything for me
<evertedsphere>
oh wild
<clever>
evertedsphere: nix will automatically download foo for you
<vika_nezrimaya>
mmhm! but it won't pollute your env unless you explicitly add it to home.packages
liminal18 has quit [Quit: Leaving]
<evertedsphere>
so what's the right way to just execute this systemd-user script with bash
<evertedsphere>
should i change it to a nix thing and use ${pkgs.bash} or something
<evertedsphere>
like #! /usr/bin/env ${pkgs.bash} (or is it in coreutils? idk)
orivej has joined #nixos
_e has quit [Quit: WeeChat 2.7.1]
<clever>
evertedsphere: that would turn into `#!/usr/bin/env /nix/store/hash-bash/`
<vika_nezrimaya>
#!${pkgs.bash}/bin/bash
<vika_nezrimaya>
like this :3
<clever>
evertedsphere: which makes no sense at all, your running env on a dir
<evertedsphere>
i would actually like some form of nix variable interpolation in these shell scripts, like i don't want to write everything in inline ''...'' blocks if i can help it
<evertedsphere>
and i have to do something like that for every single script i want to refer to. huh.
<clever>
evertedsphere: you can copy several scripts in a single runCommand
<evertedsphere>
can't i just somehow make home-manager's systemd units "see" nix-shell
<evertedsphere>
if so, i don't have to go through all this i think
<clever>
evertedsphere: or you can write a nix function, that takes the name of something, and calls runCommand, inserting ${something}s everywhere
<clever>
evertedsphere: f = name: path: pkgs.runCommand name {} mkdir -pv $out/bin ; cp ${path} $out/bin/${name} ; patchShebangs $out/bin'';
<clever>
evertedsphere: then do `f "foo" ./foo.sh`
<evertedsphere>
(aside: i removed all the channels from my system, and made a fully-pinned-everything nixops setup that i use to manage my system now, which is a lot of fun)
<evertedsphere>
wait are you the clever from not-os
<hpfr[m]>
i'm getting an error trying usb redirection with virt-manager `g-exec-error-quark: Could not redirect [Device] at 1-24: Failed to execute child process "spice-client-glib-usb-acl-helper" (No such file or directory)`. That seems like nix has something to do with virt-manager not finding a usbredir dependency. Can you guys use USB redirection with virt-manager? Or does anyone know a way to fix this?
<evertedsphere>
clever: is there an alternative way to run patchShebangs on a whole directory of scripts at once so i can just call ${pkgs.patched-scripts}/bin/foo.sh
<vika_nezrimaya>
clever: btw I also usually use stdenv.shell
o1lo01ol_ has quit [Remote host closed the connection]
<clever>
evertedsphere: `patchShebangs $out/bin` will patch everything in $out/bin
<vika_nezrimaya>
evertedsphere: are you running from a NixOS checkout too? :3
<evertedsphere>
i currently have ` maschinen-scripts = pkgs.copyPathToStore ../scripts;
<vika_nezrimaya>
I'm sometimes dabbling in NixOS development so I basically have to run from a checkout
<evertedsphere>
in nixpkgs.config.packageOverrides
<clever>
evertedsphere: paths are copied automatically, you can just do maschinen-scripts = ../scripts;
<evertedsphere>
clever: right, i think i just like how it makes it clear what the store action is but if that's the preferred style i'll do that instead fro mnow on
<asbachb>
Is there a graph of hydra load/queued items over time?
<evertedsphere>
clever: can i put that in packageOverrides?
<clever>
evertedsphere: yep, just assign it to some attr
<vika_nezrimaya>
asbachb: I never saw something like this but it's possible, since the data is public
<evertedsphere>
neat, and then i can just run ${pkgs.some-attr}/bin/scriptname.sh?
<infinisil>
clever: Note that stdenv.shell isn't correct when cross compiling
<infinisil>
There's pkgs.runtimeShell though
<vika_nezrimaya>
clever: wow, this scripts one liner clever
<vika_nezrimaya>
In the meanwhile I'm discovering some downsides of flakes - since they don't allow for arguments or ANY impurities, everything should be in a flake. Including secrets
<infinisil>
bhipple: 8.8.3 isn't supported by HIE itself, so no way all-hies can support it
numkem has joined #nixos
<evertedsphere>
uhh
<vika_nezrimaya>
well, that's actually a great opportunity to separate my NixOS configuration into modules and machine definitions
<evertedsphere>
sed: couldn't open temporary file /nix/store/h6aw6fjdb05ai023wyb9vmwzsnykwng3-maschinen-scripts/4kzkb3ba296mgl35c91i0cmdzqlbc577-scripts/polybar/sedda48ug: Permission denied
<evertedsphere>
it patches the /bin/sh right and then dies with this
<clever>
evertedsphere: oh right, you need to insert a `chmod -R +w $out` in there
<clever>
evertedsphere: the `cp -r` preserved the read-only flag, so it doesnt have permission to patch things
<evertedsphere>
ah i see
<bhipple>
infinisil: oh I see, so if I have a project that's using ghc 8.8.3, just no HIE then?
<bhipple>
Ryan and I just moved nixpkgs-update to 8.8.3 :'(
<infinisil>
Pretty much yeah, would have to make a PR to HIE to add support
<numkem>
Hi, I'm currently building a package for AdGuardHome and when it's building I'm getting this error: -binutils-2.31.1/bin/ld: cannot find -lz
<bhipple>
It looks like there's a lot of work to do to get all-hies to support the latest HIE as well, too?
<evertedsphere>
wait does patchShebangs not recurse into subdirs
<clever>
evertedsphere: it does not recurse, you must point it to the dir the scripts are in
<evertedsphere>
i see
<vika_nezrimaya>
clever: while you're here && if it is on-topic enough to ask you a question about not-os: how to build it? fails with error: attribute 'enable' missing, at /home/vika/Projects/nixpkgs/nixos/modules/system/boot/kernel.nix:196:13
learnday20 has quit [Remote host closed the connection]
<evertedsphere>
clever: is it idiomatic to have large shell scripts as multiline strings in nix files
<clever>
vika_nezrimaya: looks like a new option got added to nixos/modules/system/boot/kernel.nix, and not-os doesnt support it
<evertedsphere>
and not readFileWithInterpolationMagically path/to/file
<clever>
evertedsphere: thats where substituteAll comes into play, and the @token@ patterns
<numkem>
now I'm getting ENOTFOUND with anything related to nodejs during a build. Had the same problem yesterday with yarn. Google doesn't come up with much regarding nix, it seems to behave somewhat the same as inside docker
jakobrs has joined #nixos
justan0theruser has quit [Ping timeout: 272 seconds]
<clever>
numkem: that happens any time something downloads a pre-compiled ELF, you must patchelf all the things
<evertedsphere>
TIL sleep is not a shell builtin
<jakobrs>
How do I figure out when a package on nixpkgs master is going to be available in nixos-unstable?
<numkem>
clever: even npm? the command it's trying to do is npm --prefix client ci
<jakobrs>
In this case, I'm thinking about Linux 5.6
<numkem>
clever: or it's downloading a binary package
<morgrimm>
Is there a way to virtualize NixOS that allowed proper screen scaling?
<jakobrs>
Which was added 4 days ago
<clever>
numkem: npm sometimes downloads binaries along with the JS
<numkem>
clever: it's saying I don't have network connectivity
<clever>
numkem: use `strace -f -e trace=execve ....` to see what its trying to run
<morgrimm>
I'm running it in virtualbox with the vbox guest option enabled, but it's not adjusting the screen size, enabling seamless mode, etc.
<davidak[m]>
DigitalKiwi thanks for the information. have you found out for what this is used?
<morgrimm>
also, is there a good config structure recommended for really separate machines? for example, I have my nixos config for all my personal machines - but I have some package additions and stuff on my work machine that HAS to stay in our corp GH instance
<clever>
asbachb: dont count the machines with a line thru the name
<evertedsphere>
asbachb: kinda offtopic but do you speak german
<jakobrs>
This is actually kind of cool: I can see new tests being finished whenever I reload the page
<clever>
asbachb: also, are the idle machines of the same cpu arch?
<evertedsphere>
would you say "Maschinen" to refer to a bunch of computers/servers informally
<DigitalKiwi>
davidak[m]: kind of not really...like, it's usually used for console cables to cisco routers afaict...but why in this installation there were so many...idk
<vika_nezrimaya>
clever: there are two ways in which it can be fixed. Either I vendor the NixOS kernel.nix and modify it so it won't include the option or I introduce a dummy option that would be probably always true
<vika_nezrimaya>
Which one is preferred?
<clever>
vika_nezrimaya: i'm already editing it to add the dummy option
<vika_nezrimaya>
ok, should I wait for you to push it, then try again? :3
<asbachb>
clever: e.g. t2a, t4b should be able to do x86_64-linux if I get it right.
<evertedsphere>
err shit i didnt realise there was a newline in there
<davidak[m]>
DigitalKiwi yeah, some hardware needs non-standard console cables
<vika_nezrimaya>
I'm really interested in new ways to build operating systems with Nix aside from NixOS and its modules
<evertedsphere>
but doing that gives me `/nix/store/bd3xj2p79zrqkz9xr8daq6752avvv90f-stdenv-linux/setup: line 739: : No such file or directory`
<evertedsphere>
patchShebangs succeeds but substituteAll i think fails
<morgrimm>
Could I theoretically build a work flake that takes my personal flake as an input and overrides/overlays/adds the stuff that I need on the work machine?
<morgrimm>
if I need to keep them truly separate
<rnhmjoj>
clever: what's up? did my PR cause some issue?
magnetophon has quit [Ping timeout: 265 seconds]
<clever>
evertedsphere: do you have an @xinput@ in your script?
<evertedsphere>
yes
<clever>
rnhmjoj: the `with import <nixpkgs> {};` breaks the channel: evaluation aborted with the following error message: 'Illegal use of <nixpkgs> in Nixpkgs.'
justan0theruser has joined #nixos
jakobrs has quit [Quit: WeeChat 2.7.1]
ambroisie has joined #nixos
<rnhmjoj>
i meant PR #80114, that you linked before
Rusty1 has quit [Remote host closed the connection]
<numkem>
clever: I get empty outputs for each child processes... It seems to be common on nix to have no internet connection when using node, still digging through nixpkgs' issues
<jakobrs>
Umm
<jakobrs>
I forgot that I have to compile the kernel myself if I follow master
cr4y1 has quit [Remote host closed the connection]
<clever>
jakobrs: and you may need to recompile every time you run nixos-rebuild, because master may have changed
<jakobrs>
yeah...
ambroisie has quit [Ping timeout: 256 seconds]
<clever>
jakobrs: but if you pick a single rev of nixpkgs, you only have to build once
<jakobrs>
Is there a way to "select" the latest build that has succeeded on hydra?
<clever>
jakobrs: read hydra, pick a rev, and paste that into the nix code
<jakobrs>
Alternatively, can I use a store path directly instead of a derivation
<clever>
jakobrs: otherwise, use a channel, the channels only update when things pass
<evertedsphere>
clever: i do have an @xinput@ in my script, what do you think might be the case
<{^_^}>
[nixpkgs] @etu merged pull request #83896 → PHP: Make the default package more sane [v3] → https://git.io/Jv59z
<evertedsphere>
erm. if i have "everything" in my system pinned and i depend upon pkgs.coreutils in a derivation why is it downloading and compiling coreutils from scratch
<clever>
numkem: npm wants to download stuff while building, thats what yarn2nix and friends solve
knupfer has quit [Client Quit]
<clever>
evertedsphere: line 9 doesnt fully do what you want, it changes the nixpkgs used by nixos, but it doesnt change the nixos modules used by nixos
knupfer1 has joined #nixos
<clever>
evertedsphere: which can lead to weird bugs, because the services and packages are out of sync
<evertedsphere>
i see, i've always feared something like that
<{^_^}>
[nixpkgs] @flokli pushed commit from @volth to release-20.03 « firefox: mark as broken on 32-bit buildPlatform »: https://git.io/JvN0q
<evertedsphere>
i only began writing nontrivial nix like 4 days ago haha
<evertedsphere>
how would i fix that?
<hpfr[m]>
is there a way to manually add polkit `.policy` files in nixos configuration?
<numkem>
clever: is it possible to take the output of node2nix and merge it with a stdenv build? I assume the idea is to have eveyrthing already preinstalled so npm doesn't have to do anything when it's executed
<clever>
evertedsphere: its better to leave nixpkgs.pkgs as-is, and let it come from whatever nixpkgs you got nixpkgs/nixos/default.nix from
knupfer1 is now known as knupfer
<clever>
evertedsphere: just delete lines 5 and 9
<evertedsphere>
idk if this is relevant but i've removed all channels from my system
<clever>
numkem: ive not used node2nix much, only yarn2nix
markus1189 has quit [Ping timeout: 256 seconds]
<evertedsphere>
wait but how do i "pin everything" then
<clever>
evertedsphere: you still have to tell nixos-rebuild which nixpkgs to get nixpkgs/nixos/default.nix from
<evertedsphere>
i would like to avoid using any sort of system nixpkgs
<numkem>
clever: assuming they are similar it would be possible?
<evertedsphere>
i don't nixos-rebuild
<evertedsphere>
i use nixops deploy
<evertedsphere>
exclusively
<evertedsphere>
my /etc/nixos is empty (i've been thinking about putting in some dummy file with impossible asserts in there to ensure nixos-rebuild fails loudly like i think i saw in infinisil's config)
<clever>
evertedsphere: by default, nixos-rebuild uses <nixos-config> to find configuration.nix, this line remaps it to a file that causes errors, so it never even looks in /etc/nixos
<clever>
evertedsphere: and the line right after that, maps <nixpkgs> to whatever nixpkgs was used to build the current nixos
<bhipple>
Using NixOps to deploy localhost is an interesting idea; what's the primary motivation?
<evertedsphere>
bhipple: mostly learning nixops, tbh, but also just having some sort of super-declarative config
mehlon has joined #nixos
<evertedsphere>
oh i see
<evertedsphere>
so NIX_PATH can point to something that is out of sync with what i actually think <nixpkgs> points to
<zeta_0>
so the 1st two lines would be placed in the `let` part and the rest of the code needs to place in the `in` part of the `let in` expression? https://dpaste.org/jFb4
<zeta_0>
but, i need that line of code to import that screened.nix file, that i'm using for cabal2nix into default.nix, i was just trying to get rid of the syntax errors
<evertedsphere>
tried doing hnew.callCabal2Nix, pkgs.callCabal2Nix, nothing worked
<clever>
zeta_0: then reference the variable somewhere
<clever>
> haskellPackages.callCabal2Nix
<clever>
> haskellPackages.callCabal2nix
<evertedsphere>
err.
thetet has joined #nixos
<clever>
> true
<{^_^}>
true
<clever>
evertedsphere: weird, the bot didnt print it, but your casing is off, its nix, not Nix
<{^_^}>
attribute 'callCabal2Nix' missing, at (string):293:1
<{^_^}>
<LAMBDA>
<clever>
infinisil: out of order execution!!! lol
eoli3n__ has joined #nixos
<mehlon>
that's functional programming baby!
knupfer has quit [Quit: knupfer]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
knupfer has joined #nixos
<{^_^}>
[nixpkgs] @nh2 opened pull request #84382 → openblas: Add `singleThreaded` option. Off by default. → https://git.io/JvNEg
<clever>
evertedsphere: try tab completing haskellPackages.callCabal in nix repl
growpotkin has joined #nixos
<zeta_0>
clever: i'm not sure what you mean by that? here's what i have so far: https://dpaste.org/Na1u
<evertedsphere>
erm. haskellPackages is apparently not a thing, but i can do this:
<evertedsphere>
nix-repl> haskellPackages
<evertedsphere>
error: undefined variable 'haskellPackages' at (string):1:1
<evertedsphere>
nix-repl> :t (import <nixpkgs> {}).haskellPackages a set
<numkem>
how do you test new options that you define? nixos-rebuild switch -I <pathtonixpkgs>?
<evertedsphere>
and then tabbing does nothing
<clever>
evertedsphere: `nix repl '<nixpkgs>'`
<clever>
evertedsphere: then `haskellPackages.callCabal<tab><tab>`
<evertedsphere>
oh huh i get it now
<clever>
zeta_0: add cabal2nix-file somewhere, like in the buildInputs list
<clever>
zeta_0: oh, line 4 sorta does that now
<evertedsphere>
isn't the tool itself called cabal2ni- oh. derp.
<clever>
evertedsphere: callCabal2nix will run cabal2nix for you, then run callPackage on the resulting file, using IFD
<clever>
,ifd evertedsphere
<{^_^}>
evertedsphere: import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<clever>
evertedsphere: its sort of like template haskell
<evertedsphere>
i've ... heard *of* ifd but never actually used it consciously or recognised it being used in the wild
reallymemorable has quit [Quit: reallymemorable]
<clever>
evertedsphere: using it within nixpkgs isnt allowed, because it harms the performance of `nix-env -i` and such, but your free to use it within your own stuff, and nixpkgs does contain code to help with it (like callCabal2nix)
<zeta_0>
clever: ok, the errors went away so i think this is correct, see line 7: https://dpaste.org/LMDX
zupo has joined #nixos
levdub has joined #nixos
<evertedsphere>
i see
magnetophon has quit [Ping timeout: 265 seconds]
<evertedsphere>
so there's always a way around it?
<clever>
evertedsphere: you can also just run cabal2nix yourself, any time the cabal file changes, and then use callPackage
<{^_^}>
[nixpkgs] @lheckemann pushed 8 commits to structured-attrs: https://git.io/JvNEH
<evertedsphere>
that's what i do currently. kinda annoying
<clever>
evertedsphere: and callCabal2nix solves that anoyance entirely!
immae has quit [Quit: WeeChat 2.4]
asbachb has quit [Remote host closed the connection]
levdub has quit [Ping timeout: 265 seconds]
FRidh has joined #nixos
FRidh2 has quit [Ping timeout: 265 seconds]
thetet has quit [Quit: Leaving.]
FRidh has quit [Client Quit]
<zeta_0>
clever: in this generic default.nix file that i use for haskell, do i need to reference cabal2nix_file in a `in` part somewhere else in the file as well? no syntax errors are being thrown, and i have nested `let in` expressions, so i'm not sure where cabal2nix_file would need to be placed? https://dpaste.org/c1g0
<morgrimm>
Are there granular docs on nix/nixpkgs? Like, I've been through the manual, the wiki, the pills - but I can't seem to find out how to just flat out get explicit docs on functions, processes, other stuff
<energizer>
i almost feel like the whole above-the-fold of nixos.org/learn should be just "THERE ARE SEPARATE MANUALS FOR EACH OF THESE"
<sephii>
I have 2 channels configured on my system: nixos (points to nixos-19.09) and unstable (points to nixos-unstable, used only for specific packages). Now when I installed packages in a non-declarative way (eg. `$ nix-env -i foobar`), it seems to automatically pick up the unstable one (I guess because it has a more recent version). Is there a way to not use unstable by default?
<morgrimm>
gchristensen: For example, if I wanted to figure out what the meta attr does in a derivation, I either look at existing expressions in nixpkgs, or like
<gchristensen>
energizer: send a PR? :D and cc @garb\as
<evertedsphere>
that's a 404 gchristensen
<morgrimm>
hunt it down in that page in lang-specific parts
<{^_^}>
[nixpkgs] @numkem opened pull request #84386 → AdGuardHome: init at 0.101.0 → https://git.io/JvNu3
ottidmes has joined #nixos
<zeta_0>
so where do i need to place mkDerivation in this default.nix file? i'm confused: https://dpaste.org/v8Qs
o1lo01ol1o has joined #nixos
<energizer>
i have a multiline string in nix and i want to write it into a file, how do i do it? i tried `echo ${mystr} > file` but i think that expanded incorrectly
<evertedsphere>
can i add my own nixos-level config options that the global `config` record will be populated with
<morgrimm>
As another example, build phase attributes, and other builder attributes - the manual has a list of them, but they don't go any detail about the unpacking phase, or any others - just buildPhase, and adding another phase
<evertedsphere>
say i wanted to be able to do {config,...}: ... someFunction config.myEmail
<gchristensen>
energizer: one way is to use passAsFile ... mkDerivation { passAsFile = [ "mystring" ]; mystring = mystr; buildPhase = '' cat $mystringPath > file ''; }
thetet has joined #nixos
<morgrimm>
The manual seems to have just enough to teach the topic at hand, which is awesome, but is the intent to go read existing derivations to learn anything more advanced, or?
<ottidmes>
evertedsphere: sure, thats just creating yourself some options, all other config is populated through options too
<gchristensen>
morgrimm: I think it is just hard to document it all, especially when things aren't 100% documented
<gchristensen>
morgrimm: I often use search.nix.gsc.io to learn about things
domogled has joined #nixos
<energizer>
gchristensen: thanks
gustavderdrache has quit [Quit: Leaving.]
<evertedsphere>
ottidmes: how does one actually do that?
<morgrimm>
Like for example, I'm trying to hunt down how to install an executable shell script from src into the profile's bin
<morgrimm>
There's some wiki articles about packaging/wrapping, but they each again only have enough specific info for their article topic
<morgrimm>
`install` seems to be the command they're using to install the binary for the user's env
<eyJhb>
Where can I put a writeScript, so that it is available in my path? Something dead simple
<gchristensen>
writeScriptBin so the script goes in to $out/bin/$name
<gchristensen>
and then you'll need to put that in like, environment.systemPackages or whatever
<morgrimm>
gchristensen: and where would I find info on syntax/args for writeScriptBin? Searching hound is a good way to see examples, but
<morgrimm>
Ah, manual
thetet has quit [Quit: Leaving.]
<gchristensen>
that is how I would do it, or find the source of the function like "writeScriptBin ="
<energizer>
i'm trying mkShell, and i want to inspect some of the outs, how can i find their path? normally nix-build prints the path, but nix-shell doesn't do that
<gchristensen>
zeta_0: you don't need to have mkDerivation anywhere in there
mehlon has quit [Quit: Leaving]
<morgrimm>
and in this case, writeScriptBin is a wrapper like runCommand - but what do I do if I need to cp the source AND install a script?
<theduke[m]>
cole-h: ah, so when/how is staging promoted to unstable? is there document somewhere describing how the nixpkgs update/build/release process works?
<eyJhb>
`error: The option value `environment.systemPackages.[definition 5-entry 65]' in `/etc/nixos/configuration.nix' is not of type `package'.`
<eyJhb>
When I use writeScriptBin inside my systempackages
<theduke[m]>
thanks!
<gchristensen>
eyJhb: did you use enough (..)'s?
<ottidmes>
eyJhb: forgot an option, like the config { }?
<ottidmes>
* argument
<zeta_0>
gchristensen: ok, if i remove mkDerivation, it throws the error i had before: called without required argument mkDerivation? https://dpaste.org/B6p6
<{^_^}>
[nixpkgs] @kraem opened pull request #84387 → facetimehd: update src to build with linux >= 5.6 → https://git.io/JvNua
WilliButz has quit [Remote host closed the connection]
WilliButz has joined #nixos
<kraem>
gchristensen: 👆, if you have time :)
<ottidmes>
zeta_0: that's about the arguments, which would be override or callPackage related, in this case you should be using callPackage rather than just importing and giving it an emtpy attrset
<gchristensen>
kraem: would you like to add yourself as a maintainer?
<kraem>
gchristensen: i was just about to ask if you wanted me to
<zeta_0>
that default.nix file was working fine, but as soon as i tried to import a cabal2nix file into default.nix, that's when it started throwing all these errors
<gchristensen>
please!
<sephii>
When using `nix-env -qa`, is there a way to see from which channel a specific derivation comes from?
<zeta_0>
gchristensen: ok, it doesn't look like there's any syntax errors in the default.nix file, but when i ran nix-shell --show-trace, again, it threw this error? https://dpaste.org/jtL4
<zeta_0>
gchristensen: i cloned darcs using: darcs clone --lazy http://darcs.net/screened , then i used cabal2nix with the cloned screened.cabal file with screened.nix
<zeta_0>
gchristensen: i ran: cabal2nix . > screened.nix , so i don't think that's what's causing the error
<ottidmes>
eyJhb: I use a systemd service that starts before local-fs.target
<eyJhb>
ottidmes: link?
<gchristensen>
a package I'm trying to build is erroring with "k8s.io/client-go@v12.0.0+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required" now. anyone know what i need to do to make it build again? :/
<eyJhb>
Also, does \n work in ''test\n''+"something"
<eyJhb>
> ''test\n''+"something"
<{^_^}>
"test\\nsomething"
<eyJhb>
Nope, guess not
<ottidmes>
eyJhb: not sure if you use case overlaps, since I need it relatively early, but I will gist it
<bqv[m]>
morgrimm: well, if you copy it to $out and then wrap it there, nix can gc $src
myr463 has quit [Quit: User disconnected.]
<bqv[m]>
at a guess
<morgrimm>
So, here's the thing then
<morgrimm>
I need $src to exist
<morgrimm>
it's got all the supporting scripts, shell completions, etc.
<morgrimm>
I'm guessing that's the incorrect way to do it
<theduke[m]>
soo, what's the best way to handle dynamic library dependencies with `nix-shell`?
<theduke[m]>
Eg I have something that needs `libfontconfig.so.1`. But adding `fontconfig.dev` as a dependency in `shell.nix` does not seem to make libfontconfig.so available in the shell, eg by adding the path to `LD_LIBRARY_PATH`
<zeta_0>
gchristensen: it's ok, thanks for helping me out for a bit
<gchristensen>
yep! good luck!
<eyJhb>
ottidmes, gchristensen: if I `scriptFixxmod = (pkgs.writeScriptBin "fixxmod" "#!/bin/sh\n" + xmodSetup);` in my let, and then use it in my system packages, I get the same error as before :(
<bqv[m]>
morgrimm: iirc the healthy thing to do is to copy from $src to $out, but i think i just do that out of habit, i'm not sure where i saw precedent
<bqv[m]>
anyone else who cares feel free to correct me
pbb has joined #nixos
<morgrimm>
Like, I'm trying to package up asdf-vm, a version manager
<eyJhb>
ottidmes: seems to do what I want, needs a little editing :D
<morgrimm>
and it's basically just a bunch of shell scripts shimming, and zsh/fish scripts to source it
zupo has quit [Ping timeout: 256 seconds]
<bqv[m]>
theduke: that's because you're using fontconfig.dev, not fontconfig.lib
<morgrimm>
so I need the fish file to exist to source from my fish config - I've been doing that by passing it to my fish nix config and just sourcing ${mypkgs.asdf-vm}/asdf.fish
<manveru>
morgrimm: if you link to $src, that src can't be garbage-collected... OTOH your output will be smaller i guess :)
<eyJhb>
More (), damn it
ambroisie has joined #nixos
<morgrimm>
and then wrapping the asdf binary to $out/bin
<manveru>
also referencing $src outside the unpackPhase isn't needed, it'll be in the current directory in the build/install phases
<zeta_0>
clever: i'm using the darcs.env option in my default.nix like you recommended a while back, but i keep getting a bunch of errors thrown? https://dpaste.org/d03i
<morgrimm>
Apparently there are utils to install the shell completionl
<morgrimm>
shell completions* for fish
<bqv[m]>
zeta_0: have you read the error?
chloekek has quit [Ping timeout: 256 seconds]
<bqv[m]>
morgrimm: probably! but for the record there's nothing wrong with leaving stuff lying around in the root of $out. It has no significance to nix. only $out/{bin,libexec,etc,share,lib,include} etc do
<zeta_0>
bqv[m]: yes, it tells me that i need mkDerivation as an argument in buildInput, so after i place it there, another error gets thrown? https://dpaste.org/m6fZ
<zeta_0>
error: cannot coerce a function into a string, what does `coerce` mean in this context?
<manveru>
> "${a: 1}"
<{^_^}>
cannot coerce a function to a string, at (string):293:2
<bqv[m]>
it means nix is assuming that you've given it a string, so it's trying to turn what you gave it into a string. as it happens, what you've given it is not something it knows how to coerce (turn into) a string (functions aren't very string-y) so it's throwing it back to you because it's not right
shibboleth has quit [Quit: shibboleth]
zupo has joined #nixos
Pwnna has joined #nixos
<Pwnna>
> It is important to note that due to how development mode is implemented on Nix it is not possible to have multiple packages simultaneously in development mode.
<{^_^}>
error: syntax error, unexpected IN, expecting ')', at (string):293:140
<Pwnna>
does this mean i cannot enter multiple nix-shells simultaneously of 2 different projects?
<Pwnna>
or does this mean i cannot ever have more than 2 projects in development mode
<{^_^}>
[nixpkgs] @rycee opened pull request #84395 → documentation: minor spelling and stylistic fixes → https://git.io/JvNg1
<{^_^}>
[nixpkgs] @rycee closed pull request #84262 → [20.03] documentation: minor spelling and stylistic fixes → https://git.io/JvbSZ
<zeta_0>
manveru bqv[m] , i'm assuming it has to do with the buildInputs in the default.nix file, because i haven't changed: make-package-set.nix(where the error is being thrown): https://dpaste.org/Qdqh
cetjs2 has left #nixos ["Leaving"]
fendor has quit [Read error: Connection reset by peer]
<fsmnarmosta[m]>
Is there a reason as to why there is both a hicolor_icon_theme and a hicolor-icon-theme?
lsix1 has quit [Ping timeout: 265 seconds]
<simpson>
Pwnna: Multiple packages simulataneously in development mode within one single nix-shell context, I think. You can have multiple nix-shells open in multiple directories.
<Pwnna>
ok
<zeta_0>
manveru bqv[m] , there is no syntax errors being thrown, so it must be a logic error, somewhere in the buildInputs section, at this point i have no idea
<manveru>
zeta_0: sometimes it's a function you didn't pass all arguments to, remember that all attributes in your derivation are turned into strings so they are available as environment variables later
fusion809 has quit [Remote host closed the connection]
levdub has quit [Ping timeout: 240 seconds]
<zeta_0>
manveru: my default.nix file was working fine, but i needed to import a cabal2file, so i added this piece of code, which is causing the error: https://dpaste.org/cLtv
<zeta_0>
into the default.nix file
<Pwnna>
what's the sqlite3 binary package called in nix
<Pwnna>
the one where i can get a sqlite3 shell
<andi->
sqlite :)
<manveru>
,locate bin sqlite
<manveru>
,locate bin sqlite3
<Pwnna>
$ nix-env -qaP sqlite3
<Pwnna>
error: selector 'sqlite3' matches no derivations
<manveru>
there's sqlite and sqliteInteractive
<manveru>
`nix search sqlite` :)
<{^_^}>
Found in packages: sqlite.bin, sqlite_3_30.bin, sqlite-interactive.bin, sqlite-replication.bin
<{^_^}>
Found in packages: tcl, sqliteman, sqlite-web, sqlite.bin, createrepo_c, sqlitebrowser, sqlite-analyzer, sqlite_3_30.bin, lispPackages.sqlite, sqlite-interactive.bin, sqlite-replication.bin
<Pwnna>
ah ok
<Pwnna>
Also, is it a good idea to pin to the release-20.03 branch in my default.nix file?
<Pwnna>
maybe a bit more stability than unstable?
<Pwnna>
not that I have an issue
<manveru>
i always pin the commit
<manveru>
`niv` is really handy for that
<Pwnna>
i want to be somewhat up to date but not always on the cutting edge if that makes sense
<zeta_0>
the biggest problem that i have with nix is it's error messages, they are very cryptic and don't always tell you what exactly is causing the errors
<{^_^}>
[nixpkgs] @ggreif opened pull request #84397 → llvmPackages_latest: switch to llvmPackages_10 → https://git.io/JvN22
<bqv[m]>
have you tried reading them :p they're honestly very descriptive
<zeta_0>
bqv[m]: lol, is nix started to go mainstream or what, nix's error messages are horrible, that's why i have to come here to ask questions
<zeta_0>
they tell you more or less where the errors are at, but they don't tell you why
opthomasprime has quit [Remote host closed the connection]
<manveru>
i think they're looking for help
<bqv[m]>
last error you posted, canot coerce a function to a string, it tells you what line it is, what it's trying to do, and leaves it to you to fix it. there's no more detail because for nix to have more detail would mean it could fix your code for you, and it's not psychic
<bqv[m]>
error before that, mkDerivation not passed as an input, the problem is literally what it says
<zeta_0>
manveru: i would contribute, but right now i'm contributing to darcs and xmonad, so i don't want to spread myself to thin
<bqv[m]>
having tried a pretty considerable number of languages, the errors in nix are plenty fine in my opinion
<bqv[m]>
the only problem i've had is when the error tells me there's a problem at <unknown-file>, but that's a fringe case
<zeta_0>
bqv[m]: but when i pass mkDerivation as an input to buildInputs, it throws another error, i keep running in circles here
<zeta_0>
i'm sorry for complaining about nix(it's a good tool), i'm just frustrated right now
markus1189 has quit [Ping timeout: 256 seconds]
<bqv[m]>
have you tried googling this? have you tried looking at other examples of the sort of thing you're trying to do? have you tried just fiddling with a few things to see what happens?
<bqv[m]>
the reason i mention being a help vampire, is that it seems like you're just throwing your problem at us with very little effort on your part, and that can be frustrating for us
<bqv[m]>
i noticed gavin trying to teach you how to troubleshoot manually earlier, but you've simply come back with another set of problem that leaves us somewhat flabbergasted
<simpson>
It can be both; Nix can be tricky *and* also Nix's error messages are not completely uninformative.
<zeta_0>
i'm sorry if i come across as a help vampire, sometimes instead of staying stuck trying to fix an error for hours and hours, i just come here to ask questions, it saves me lot of time
nschoe has quit [Read error: Connection timed out]
mallox has quit [Quit: WeeChat 2.7.1]
nschoe has joined #nixos
markus1189 has joined #nixos
skorpy2009 has quit [Remote host closed the connection]
<zeta_0>
bqv[m]: i already search online, but this is the only thing that i could find that's similar to my issue, and it doesn't help very much: https://github.com/NixOS/nixpkgs/issues/29539
<{^_^}>
#29539 (by ghost, 2 years ago, closed): gogs.nix reports "cannot coerce null to a string" with 17.09
<zeta_0>
that article on help-vampires is funny, it makes me feel guilty for asking too many questions here
<{^_^}>
[nixpkgs] @doronbehar opened pull request #84401 → gnuradio: 3.7.13.4 -> 3.7.14.0 & more → https://git.io/JvNak
peanutbutter144 has quit [Ping timeout: 265 seconds]
peanutbutter144 has joined #nixos
markus1189 has quit [Ping timeout: 265 seconds]
knupfer has quit [Ping timeout: 260 seconds]
markus1189 has joined #nixos
<bqv[m]>
pkgs.callPackage ./screened.nix {};
<bqv[m]>
replace this with pkgs.haskellPackages.callPackage ./screened.nix {};
__monty__ has quit [Quit: leaving]
<bqv[m]>
i'll explain how i determined that's your problem.
<bqv[m]>
https://dpaste.org/PSfJ#L4 this is your file. i have no idea how haskell instrumentation in nix works, but i searched the nixpkgs repo for "setupHaskellDepends"
<bqv[m]>
without a shred of knowledge of what you're trying to do or how haskell works in nix, and a few minutes of searching and a vague understanding of your error, i worked out what was going wrong
<bqv[m]>
the point is, this is something you should learn to do
nschoe has quit [Read error: Connection timed out]
nschoe has joined #nixos
<zeta_0>
bqv[m]: thanks, and i apologize for being a help vampire, i eventually need to set some time aside to focus more on nix, right now all of my time and effort is going into haskell, a lot of the things that i've learned with haskell aren't helping my understanding of nix
<cole-h>
It's OK to ask for help. It's better if you ask for help with an explanation of what you think should be happening, what you've tried, etc.
linarcx has quit [Ping timeout: 258 seconds]
<zeta_0>
please don't burn me at the stake for being a help vampire, i'm just joking, that article made me laugh and feel guilty at the same time, lol
<zeta_0>
cole-h: ok, understood
<simpson>
Wait, that's your first time seeing that article? I'm surprised. I feel like this is not the first time that this (meta-)conversation has happened.
<zeta_0>
simpson: gchristensen and infinisil sent me a different article a while back, but i can't remember what it was about, that was months ago
<simpson>
I read the Nix error proposal. I like the readability aspects a lot, but I'm not sure how it would have helped in this particular situation.
<cole-h>
:P I remember trying to help someone here and then a user who shall rename unnamed sent me that article (had never seen it before myself)
snicket has quit [Ping timeout: 240 seconds]
maddo has quit [Quit: See ya]
chagra has joined #nixos
<bqv[m]>
i only first saw it a few days ago in another community, i'm so glad this phenomenon has a name now, it's been common for decades
<zeta_0>
anyways, i have to run a quick errand, i'll be back in a couple of minutes(i forgot what the irc command is to notify the chat room that i'm taking a break)
<bqv[m]>
you're looking for /away
tghume_ has joined #nixos
<cole-h>
(Which doesn't usually notify everybody because most people filter that out)
wirew0rm has quit [Remote host closed the connection]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnny5 has joined #nixos
Thra11 has quit [Ping timeout: 258 seconds]
tghume has quit [Ping timeout: 246 seconds]
wirew0rm has joined #nixos
<zeta_0>
oh cool, thanks and it's nice to have access to people that are way smarter than me, i feel like i've learned so much more in these past few months with an irc connection, than when i was learning by myself off the internet, anyways, i'll be back in a while
johnnyfive has quit [Ping timeout: 260 seconds]
felixfoertsch23 has joined #nixos
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
felixfoertsch has quit [Ping timeout: 260 seconds]
felixfoertsch23 is now known as felixfoertsch
justan0theruser has quit [Ping timeout: 265 seconds]
<bqv[m]>
nix is building 4000 derivations :| that's what i get for not rebuilding this machine for a few months
<tek[m]>
I'm trying to install obelisk (https://github.com/obsidiansystems/obelisk/blob/master/default.nix) and the dependency `x509-validation` loops infinitely in the `test` phase, apparently polling `/dev/*random` and getting `EINVAL`. can somebody explain this? is this a sandbox issue? obelisk appears to be supplying its own dependencies, since I can install that dep manually without this issue.
<{^_^}>
[nixpkgs] @jtojnar pushed to master « nixos: try to fix channel eval »: https://git.io/JvNVO
<immae>
bqv[m]: I sympathize, I spent the weekend upgrading a whole (quite big) cluster from 19.03 to 19.09 and then unstable...
<tek[m]>
in the linked `default.nix`, there is a list of overlays, where I tried adding an override for `x509-validation` using `dontCheck`, but the attribute appears not to be read at all
<tek[m]>
* in the linked `default.nix`, there is a list of overlays, where I tried adding an override for `x509-validation` using `dontCheck`, but the overridden attribute appears not to be read at all
<bqv[m]>
tek: you could try building without the sandbox, see if that helps, you might be right
cybrian has quit [Ping timeout: 256 seconds]
drakonis has quit [Quit: WeeChat 2.7.1]
<bqv[m]>
immae: i'm just trying to merge my machine configs, but that means switching this system to flakes *and* upgrading it from the config i last built possibly last year at this point
johnjay has quit [Ping timeout: 250 seconds]
<bqv[m]>
tek: the ordering might matter. if something used x509-validation before your overlay, it wouldn't have any effect
justan0theruser has joined #nixos
<bqv[m]>
I would still try building with the sandbox off, as a diagnostic
morgrimm has quit [Ping timeout: 265 seconds]
<tek[m]>
bqv: how do I deactivate it?
bqv has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
<cole-h>
`--option sandbox off` should do it, I believe
morgrimm has joined #nixos
<tek[m]>
thanks
johnjay has joined #nixos
<tek[m]>
seems not to make a difference
bqv has quit [Remote host closed the connection]
<bqv[m]>
sorry, i was lagging. the server my homeserver is running on has decided it wants to compile qemu
<tek[m]>
I think it's the irc bridge, mine is lagging as well
<immae>
Hello there, I just identified a bug that will make a potentially big breakage in certificates when migrating from 19.09 to 20.03, and I think that should at least be mentionned somewhere in the release note: https://github.com/NixOS/nixpkgs/issues/84409 (the current notes just say "we migrated from simp_le to lego, everything should work flawlessly"), who should I poke in the PR to have it properly
<{^_^}>
#84409 (by immae, 1 minute ago, open): Change of acme certificate from simp_le to lego breaks workflow
<immae>
handled?
<cole-h>
worldofpeace: ^
<liminal18>
how would I pass pkgs to a function expecting sasl, and other pkgs?
<liminal18>
in javascript this would be the spread operator ...pkgs in nix can I do something like that?
mbrgm_ has joined #nixos
learnday20 has quit [Quit: Leaving]
<ottidmes>
liminal18: that is what callPackage does for you
<bqv[m]>
the problem is that i don't think that file is expecting to be callPackage'd
mbrgm_ is now known as mbrgm
mbrgm has quit [Ping timeout: 260 seconds]
<morgrimm>
Alright, I'm a little confused about the differences between installing a derivation with nix-env vs just building it. Via nix-build, $out becomes the generated store path, correct? So I did a quick test and flat out replaced $out - and when I installed the derivation with nix-env, it replaced my ~/.nix-profile
<liminal18>
bq it is not it's a function that accepts some packages and then uses callPackage
<morgrimm>
As expected
<liminal18>
so it should be import /mongo/v4_0.nix {...pkgs}
<morgrimm>
But, if I copy my entire source to $out, and then makeWrapper $out/bin/whatever $out/bin/whatever
<liminal18>
or something like that
<morgrimm>
the output of building the derivation with nix-build is different than the outcome of installing it with nix-env
<morgrimm>
i.e installing it somehow brings the bin in it, but only that (i assume due to the makeWrapper), but checking the store path of the build shows the entire source in there like I thought
erictapen has quit [Ping timeout: 240 seconds]
<bqv[m]>
liminal18: you could always call it with (pkgs // { extra1 = blah; extra2 = blah; }), but i feel like there'll be a better solution to what you want to do
<ottidmes>
liminal18: but really, doing that is callPackage, is literally saying give me all function arguments, and take out of pkgs those function arguments
<morgrimm>
What doesn't make sense is how my nix-profile link was replaced when I flat out just echoed a string to $out, but copying the whole source into it resulted in a the path for my package and the profile store path being different
reallymemorable has quit [Quit: reallymemorable]
kaliumxyz has joined #nixos
<liminal18>
ok the problem seems to be I am missing pkgs.sasl actually
<ottidmes>
liminal18: if it is a mac specific thing and you are not on mac (or should I say darwin), then you can just assign null to them
<liminal18>
ok it is building
<liminal18>
ottidmes: thaks
spacefrogg has quit [Quit: Gone.]
aw has quit [Quit: Quitting.]
<ottidmes>
stdenv.lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ]; seems like sasl is needed though