<Reiser>
I've installed NixOS, and setup LVM with a dm-crypt root inside it. When I reboot, it doesn't detect the LVM groups at all. If I enable ssh in initrd, and manage to SSH while It's still trying to mount the disk ( 10 second timeout ), then I can `lvm vgchange -ay` and the cryptsetup unlock + boot works just fine
<Reiser>
Is there something I've missed? Why isn't initrd detecting my LVM devices automatically?
anderslu1dstedt has quit [Ping timeout: 272 seconds]
bahamas has joined #nixos
bahamas has joined #nixos
bahamas has quit [Changing host]
Fare has joined #nixos
sigmundv_ has quit [Ping timeout: 272 seconds]
<infinisil>
astylian: Glad it worked, but please answer the questions that are being asked in the future. I asked for the output of the installation because it gives additional debug info. Knowing it looks fine doesn't help with debugging
<infinisil>
Similarly, if you report problems, say what the problems are, not just "does not work"
<matthewcroughan>
clever: I'm on nixpkgs unstable and with colemickens' packages, but it looks like Firefox is still trying to use Xwayland despite my Sway config having xwayland off
<matthewcroughan>
So, in progress, but not ready right now?
<colemickens>
IMO it's ready to merge but no one has really reviewed :(
<cole-h>
Anybody familiar with systemd -- how long does the build take on your machine? (with machine specs, or at least core count)
<colemickens>
it's only not enabled in Firefox upstream because of some complication of their build system and how it interacts with WebRTC's build system
<cole-h>
Wondering if I should just `git bisect skip` until I don't need to rebuild systemd lol
<matthewcroughan>
How would I add this to my personal config.nix then? colemickens
<matthewcroughan>
Is there an attribute I can override?
<matthewcroughan>
I'm really not fully used to this whole system, I will be in a few months
<colemickens>
Honestly, that question is hard to answer. Do we have a wiki page for this?
<colemickens>
But it's not just that, and that page is not good. Sorry not sorry
<cole-h>
:P
<matthewcroughan>
So the practical answer is "wait until it's merged"
<colemickens>
Like, answering this question properly requires understanding NIX_PATH, what nixos-rebuild does, what an overlay is, how to pull a attr from a diff package set, etc, etc.
<colemickens>
matthewcroughan: probably :/
<matthewcroughan>
man, this complexity comes at massive cost for not much gain sometimes.
<matthewcroughan>
I can just install arch and get this done in no time at all.
<colemickens>
matthewcroughan: fwiw, this question becomes much easier to answer in a post-flakes world
<cole-h>
tbh I would just overlay firefox to add the stuff
<matthewcroughan>
Sure, the reproducibility is lessened, but I feel it's so worth it
<matthewcroughan>
For the small things like this, it is a massive pain in the ass.
<colemickens>
matthewcroughan: I don't care. Do you still want help or someone to listen to you rant?
<matthewcroughan>
I'm not ranting?
<colemickens>
Cause like I got other things to do
<matthewcroughan>
I thank you for your time, sorry if I pissed you off.
<colemickens>
everytime you get help you end up comparing it and saying ARch is so much easier
<colemickens>
it gets old, have a nice day
<matthewcroughan>
It is, and I understand why.
<matthewcroughan>
But I'm saying, why is it that we can't have cake and eat it too?
<colemickens>
"matthewcroughan: fwiw, this question becomes much easier to answer in a post-flakes world"
<matthewcroughan>
Arch will not let me do half the things nix will, reproducibly. But for this simple task, it is not possible to explain in simple terms how to reproduce what you've done in 3 commits, locally?
<cole-h>
`nix-build -A firefox-or-whatever-the-attr-is-called -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/31e54cdde34073b3b83e9fca4434cb0cedcb2829`
<matthewcroughan>
In this issue, I was given a one-shot command like "nixos-rebuild switch -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/0c34580.tar.gz"
<colemickens>
matthewcroughan: anywhere that you want to pull in a random file, you can reach for "builtins.fetchTarball". The output of that allows you to access any file in the tarball.
<{^_^}>
#98362 (by unclechu, 2 minutes ago, open): Steam segfaults on specific hardware
<colemickens>
matthewcroughan: so anywhere you wanted to "import" that file, you could write approximately `import "${builtins.fetchTarball { url ="../nixcfg"; sha256=".."; }/mixins/common.nix`
<colemickens>
(well, I missed a matching brace, but I hope that helps)
<matthewcroughan>
It doesn't quite yet, since I'm too noob, so you don't have to be completely accurate, it's helping me understand what's possible though
<colemickens>
matthewcroughan: so, there sort of is, in a comment
<colemickens>
matthewcroughan: but that's going to be from the branch that I wrote two months ago, so you're going to get a Firefox build that is ... old enough to be insecure possibly
<matthewcroughan>
Yeah, I just wanna see if it works really
<colemickens>
But, it does still require pipewire to be running and the right env vars to be set. So you'll have to do that, or incorporate those parts into your system config and apply it.
<matthewcroughan>
Right, and I do not believe I even have pipewire, nor would I know how to use it
<matthewcroughan>
I can't wait til this gets merged I suppose
<colemickens>
well it won't do anything if you don't have pipewire enabled?
<cole-h>
colemickens: Do you use pipewire for audio?
<colemickens>
cole-h: idk, I have it enabled, I assume it's being used for audio?
<matthewcroughan>
Do you maintain x11 and wayland setups for yourself?
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/JUu8z
Fare has joined #nixos
<matthewcroughan>
I'm thinking I'm just going to have to maintain x11 still and gradually switch, because I thought everything would be in place :D
<colemickens>
cole-h: I honestly hadn't considered that it wasn't being used, but I bet pulseaudiod is running -_- because I do use pulseaudio -k? But maybe that works transparently too? now I'm curious....
<colemickens>
matthewcroughan: me? no
<matthewcroughan>
Hardcore
<colemickens>
matthewcroughan: when I need to screenshare I use obs-v4l2sink
<matthewcroughan>
Do you run firefox with pipewire locally thoug
<colemickens>
also, I don't need ot screenshare :)
<matthewcroughan>
Hmmmmm, I already prefer and love obs v4l2
<colemickens>
matthewcroughan: I do, but only so that I am true to my word on that PR
<matthewcroughan>
Can this all be done without pipewire then?
<colemickens>
matthewcroughan: yes
<matthewcroughan>
I thought you'd still need to run pipewire to get that stuff into firefox
<colemickens>
Nope, obs-v4l2sink exposes the output as a new v4l2 device via kernel module
<colemickens>
v4l2loopback kernel module
<matthewcroughan>
So pipewire is not necessary, even on wayland, to use v4l2 etc?
<colemickens>
they have absolutely nothing to do with each other
<matthewcroughan>
Yeah it's a video device just like the webcam right.. crap
<colemickens>
you got it
<matthewcroughan>
I just didn't think about it
<cole-h>
colemickens: I just remember trying it one time and I wasn't pleased with the results(?)
<matthewcroughan>
GDI
<colemickens>
cole-h: tbh I did "services.pipewire.enable=true" and thought that was enough. I didn't disable PA though, so ?
<matthewcroughan>
I simply thought that screensharing was going to be easier to fix than OBS on Wayland, but apparently not :D
<colemickens>
cole-h: I definitely have a "pulseaudio" process running, so I'm doubting my earlier assumption.
<cole-h>
I think pipewire bridges PA? So native pipewire applications work, as well as PA apps?
cosimone has quit [Quit: Quit.]
<colemickens>
matthewcroughan: well, luckily I have the OBS build in the overlay :)
<colemickens>
matthewcroughan: and actually, the obs-v4l2sink is getting upstreamed
<colemickens>
so this will all change (to a simpler method) in a while when that PR merges and is released.
<colemickens>
(which is good, obs-v4l2sink is abandonware)
inkbottle has joined #nixos
zebrag has quit [Ping timeout: 264 seconds]
<colemickens>
cole-h: so when you tested, what did you do to "switch" to pipewire?
tsrt^ has joined #nixos
<cole-h>
colemickens: I don't even remember, it was soooo long ago (like, right when I switched to NixOS). Pretty sure it was just enabling pipewire. Maybe I also tried disabling PA?
<cole-h>
Sorry :s
ddellacosta has joined #nixos
<colemickens>
cole-h: eh, it's all good, idle wondering, thanks
<cole-h>
Man, all these periods of nixpkgs being busted really hurts my bisecting efforts.... lol
<cole-h>
colemickens: Oh, I think I wasn't thrilled because I was trying to get JACK and Pipewire to communicate, and that didn't go over well
<cole-h>
(JACK in general didn't go over well)
<matthewcroughan>
jack needs re-creating
hnOsmium0001 has joined #nixos
<matthewcroughan>
it has issues that just need to be fixed, that can't be worked around or accounted for
<cole-h>
Jack itself, or Jack + NixOS integration?
<matthewcroughan>
I've tried with the dummy device to get it to handle hotplugs, but something always screws up
<matthewcroughan>
jack itself
<cole-h>
You know you're having a bad time bisecting when `git bisect log | rg 'bisect skip' -c` is 22...
<matthewcroughan>
what hardware are you bisecting on?
<matthewcroughan>
colemickens: uh, so the pipewire stuff just got merged
<cole-h>
4c4t Skylake (I think)
<matthewcroughan>
Before I could even build your damned cache version from your comment
<cole-h>
So yeah
<cole-h>
building 12 things even though I only have 4 cores
<cole-h>
:|
<matthewcroughan>
cole-h: Is it not possible to sort this out by using hydra?
<cole-h>
That's the problem
<matthewcroughan>
I would happily give you access to a better machine if it could be trustless
<matthewcroughan>
Like if I could just run workers on a machine
c4droid has joined #nixos
<cole-h>
nixpkgs was (probably) blocked when these commits were merged lol
<cole-h>
so I'm stuck `git bisect skip` or just waiting
* cole-h
can't wait until Oct 8th
<cole-h>
AMD pls make Zen 3 super omega good
<matthewcroughan>
epyc
<matthewcroughan>
1024 * 10 core cluster
<matthewcroughan>
1 core per nixpkg
<cole-h>
lol
<cole-h>
I wish
<matthewcroughan>
lol and 8TB of ram
<matthewcroughan>
A virtual machine, running in ram, per nixpkg
<matthewcroughan>
No disks, only ram
c4droid has quit [Remote host closed the connection]
* cole-h
fans self
<matthewcroughan>
Uh, so how does pipewire work
<cole-h>
Probably better to consult their repo or the Arch wiki
<matthewcroughan>
I mean, I expected it to start and enable the systemd service
<matthewcroughan>
It did not do that, so I'm unsure what is supposed to happen
Henson has joined #nixos
knerten2 has joined #nixos
<matthewcroughan>
supposed to disable PA?
<Henson>
does anybody here use procmail on NixOS? I'm trying to make a .procmailrc file do some mail forwarding, and it's not working and I keep getting a "/bin/sh: : No such file or directory" error an am wondering if there's a variable in the .procmailrc file I need to set to make it work properly with NixOS. I've tried the SHELL variable already but it didn't do anything.
<cole-h>
matthewcroughan: I don't think PA and Pipewire are mutually exclusive.
<chipb>
matthewcroughan: is pipewire even meant for general consumption at this point?
<chipb>
does pipewire do render offload magic? is it perhaps hardware and/or driver dependent (and you have different setup than colem...) or is it supposed to be agnostic to that?
<matthewcroughan>
Unsure, but I've screwed around enough to know that this probably means it's going to suck my time away :D
<matthewcroughan>
I was very hopeful that the work done by colemickens would make wayland and sway plug and play today. But it's clear that a lot of work needs to be done
<matthewcroughan>
So I hope I can contribute, am going to have to make a crappy x11 config for now though :D
<matthewcroughan>
I see this Issue for example is quite extensive
<cole-h>
idk, sway was pretty plug-and-play for me
<cole-h>
Though maybe because I was using sway on Arch before NixOS
<matthewcroughan>
sway IS plug and play. Wayland features are not
<matthewcroughan>
I mean, like I said, they could be easy to do once and never again on Arch.
<matthewcroughan>
Yknow, write-only configuration, that's what Arch is lol
philr has quit [Ping timeout: 240 seconds]
mariatsji has joined #nixos
<chipb>
I mean, it may be straightforward and it's just a small thing.
<matthewcroughan>
Maybe, but man it's going to have a learning curve
philr has joined #nixos
<matthewcroughan>
Learning nixos and wayland at the same time is like switching from Windows to Linux all over again
<matthewcroughan>
By playing with both, I will learn the differences, and get a lot of nixOS exp, so I'll do this.
<matthewcroughan>
There will come a day when the nixos wiki is as well rounded as the arch wiki
<matthewcroughan>
Pipewire integrates differently into NixOS, a lot of things do. So it's hard to transition.
<matthewcroughan>
Some things *are* the same as any other distro. But at the same time, a lot of things are not, and assumptions are broken. And the wiki doesn't yet fill in that gap, hope I can help..
<matthewcroughan>
May write an article about zfs on root now, since that isn't actually sufficient I think.
mariatsji has quit [Ping timeout: 260 seconds]
<matthewcroughan>
Looks like lots has changed actually, it's much better now. No mention of luks on it though, will edit :D
<zecnate>
In my builder script I have `head -1 ./Configure ; patchShebangs ./Configure; head -1 ./Configure` and patchShebangs doesn't seem to alter the `#!` line which remains unchanged with `#! /usr/bin/env perl`.
<zecnate>
How do I use `patchShebangs`?
cole-h has joined #nixos
cjpbirkbeck has quit [Ping timeout: 240 seconds]
<zecnate>
Oh, sorry, the version that exits successfully is `patchShebangs --build ./Configure`. Without `--build` it fails with "/nix/store/6k829xz9v508ncxfcf2p1b8g1wq54946-patch-shebangs.sh: line 56: pathName: unbound variable"
<zecnate>
Ah, I discovered the problem: I was missing perl in buildInputs. But in that case, couldn't `patchShebangs` exit with a more friendly error message saying perl wasn't found?
modaljunk has quit [Remote host closed the connection]
modaljunk has joined #nixos
<modaljunk>
hi #nixos, new user here. I'm on nixos 20.03 and I'm trying to install mopidy with the mopidy-mpd extensionpackage. mopidy-mpd is on github, but when i try to include it in extensionpackages for services.mopidy I get the error "attribute 'mopidy-mpd' missing"
<matthewcroughan>
Right so I *can* run this in a VM and give you access?
<cole-h>
You could indeed.
<matthewcroughan>
Problem is, I don't have fast storage
<matthewcroughan>
I have 24 threads at 2.4ghz on an dual X5675 system laying around, but I doubt that will help
<matthewcroughan>
Do you think it would?
<matthewcroughan>
Would be on a basic sata ssd, with 16G ram?
<matthewcroughan>
gigabit
<cole-h>
It would help more than my 4c4t machine, for sure. But I'm giving packet another go (this time, while I'm building, so I don't waste time...).
<matthewcroughan>
Well if you think it's worth it or need it for a period of time let me know and I'll sort that out
<matthewcroughan>
okay so the answer to this should be 30
<matthewcroughan>
let a = 15; a=2; in a * b
<matthewcroughan>
> let a = 15; a=2; in a * b
<{^_^}>
error: attribute 'a' at (string):323:13 already defined at (string):323:5
<matthewcroughan>
eh? What did I get wrong
<cole-h>
:P
<cole-h>
`let a = ....; a = .....`
<matthewcroughan>
oh I'm an idiot lmfao
<cole-h>
You redefined a
<matthewcroughan>
okay, great, you cannot redefine like this
<matthewcroughan>
is that on purpose? In python it would take the latest definition
gerschtli1 has quit [Quit: WeeChat 2.7.1]
<matthewcroughan>
here it throws an error, is there a philosophical reason for that?
<matthewcroughan>
> let a = 15; b = 2; in a * b
<{^_^}>
30
<{^_^}>
[nixpkgs] @bryanasdev000 opened pull request #98370 → popeye: init at 0.8.10 → https://git.io/JUuEJ
gerschtli has joined #nixos
<matthewcroughan>
Right, I get that. I don't mind it, I just find it strange.
<cole-h>
Nix is not a general-purpose programming language, so it's harmful to compare it to something like Python or Rust or C.
<matthewcroughan>
You could do it in ANY manner of ways, this is just a choice, and it's not a bad one.
<matthewcroughan>
It's less text overall.
<matthewcroughan>
Wait no it's not lol. Why is it like this :D
<matthewcroughan>
why not just have the `=` operator do what `let` does?
<cole-h>
> a = "asdf"
<{^_^}>
a defined
<cole-h>
> a
<{^_^}>
"asdf"
<matthewcroughan>
> a
<{^_^}>
"asdf"
<cole-h>
I'm afraid I can't answer the specifics of why, because I didn't create the language ;) You might find some information in Eelco's thesis, though:
<matthewcroughan>
yes, but why does it print asdf upon definition
<cole-h>
Because it's evaluating `b`
<cole-h>
That's not a definition
<matthewcroughan>
b is unset though, right?
<matthewcroughan>
> let a = hjkl; in new_variable
<{^_^}>
undefined variable 'new_variable' at (string):323:18
<matthewcroughan>
> let a = hjkl; in new-variable
<{^_^}>
undefined variable 'new-variable' at (string):323:18
<matthewcroughan>
new-variable = 0
<matthewcroughan>
> new-variable = 0
<zecnate>
matthewcroughan: Beware that `nix-repl` is different than evaluating nix expressions for building packages.
<{^_^}>
new-variable defined
<cole-h>
(and {^_^} is basically a supercharged `nix repl`)
<matthewcroughan>
> let new-variable = hjkl; in b
<{^_^}>
"asdf"
<matthewcroughan>
> b
<{^_^}>
"asdf"
<matthewcroughan>
ah I don't get it
<cole-h>
Why not?
<matthewcroughan>
Why can't I redefine b
<cole-h>
`b` is already bound to "asdf"
<zecnate>
In `nix-repl` as a convenience, you can just say `blah = 42` and `blah` will remain bound in later expressions. When using `nix-build` there's a single expression, whereas in `nix-repl` you are evaluating a sequence of interactive expressions.
<cole-h>
If you want to define b, you need to use =
Fare has quit [Quit: Leaving]
<cole-h>
> b = "asdfghjkl"
<{^_^}>
b defined
<cole-h>
> b
<{^_^}>
"asdfghjkl"
<matthewcroughan>
Oooooh okay, I se..
knupfer has quit [Ping timeout: 246 seconds]
<cole-h>
`let a = "fdsafa"; in b` is not setting `b` to the value of `a`
<zecnate>
I don't think expressions as used by `nix-build` even allow `a = …`. You can only use `let` (or `import` or `with` etc…).
<matthewcroughan>
> new-variable = 5
<{^_^}>
new-variable defined
<cole-h>
It's setting `a` to "fdsafa" and evaluating the previously-defined value of `b`
<matthewcroughan>
> let a = 1; b = 2 in a + b + new-variable
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):324:18
<matthewcroughan>
> let a = 1; b = 2; in a + b + new-variable
<{^_^}>
8
<matthewcroughan>
right. this makes sense.
<matthewcroughan>
the = is used, I see what you mean by scope entirely now..
<zecnate>
matthewcroughan: In a language like C or rust, `let … in …` is a little like a locally nested block: `do_stuff(); { int a = 42; call_thingy(a); } do_other_stuff_without_a()`
<matthewcroughan>
`let` and `in` are like a loop, but purely for definition of variables within a loop or "scope" as we're calling it
<matthewcroughan>
in a for loop, in python, if you defined a variable it would only be accessible within that loop. This is the same way, but instead of "for" you have `let`
<zecnate>
Which languages are you most familiar with?
<matthewcroughan>
shell, honestly
<cole-h>
The for-loop is the scope
<matthewcroughan>
which is more analogous, because it has "let" and "in". This is like `if` and `fi`
<simpson>
matthewcroughan: If you know Python, then the correct analogy is to a with-block, I think, and even that is still missing it a bit since there's an entire tradition of languages like ML and Nix using let/in purely for reusing subexpressions.
<matthewcroughan>
except in is actually a function that evaluates some stuff
<zecnate>
Yeah, nix expressions are substantially different than shell. ;-)
<cole-h>
matthewcroughan: You're trying to equate different things.
<matthewcroughan>
Yeah I see how it does not make sense now.
<cole-h>
`if` and `fi` are control flow, while `let ... in` is just bringing a variable into a specific scope.
<matthewcroughan>
I understand it, in a vague syntactical way.
<matthewcroughan>
That does not mean I know what one could/should/would do with it.
<simpson>
In general, factor out common subexpressions; when you see something defined twice in a block, then you can factor it out and only define it once.
<zecnate>
`let <bindings> in <expr>` defines the bindings only within `<expr>`. It keeps those definitions local to that usage so you don't need to worry about your variable definitions interfering with other code.
<matthewcroughan>
`let` starts the scope, `in` ends scope. That's all I see. Even if it's technically wrong.
<matthewcroughan>
in ends the scope, by producing a return value.
<zecnate>
The scope ends with `<expr>`, not immediatley with `in`, so the syntax might be a big unusual from a shell/python background.
<matthewcroughan>
does this "swallow" the scope? Does this mean this was ephemeral?
<simpson>
`let` binds values to names and `in` starts the scope. Nix doesn't have a terminator for that scope.
lordcirth has quit [Remote host closed the connection]
<matthewcroughan>
It reminds me a bit of forth
<matthewcroughan>
you know how they have reverse polish notation in forth?
<zecnate>
You know how if you have a function in python, like `def foo(a, b): <statements>` then `a` and `b` are only available inside the function body? It's very similar.
lordcirth has joined #nixos
<zecnate>
It's almost like this: nix `let a = 42; in 2 * a` is sorta like this python:
<matthewcroughan>
yes zecnate exactly, I get this, but I just find it arbitrary why it was done this way
<simpson>
It's not really at all like Forth, except in that things are done in a sequence. And yes, in ML (e.g. OCaml), let/in is used for sequencing actions.
<zecnate>
def _no_actual_name(a): return 2*a
<matthewcroughan>
because I don't know what benefits this provides, or what the need for it is, it seems like "oh cool, but why" to me
<zecnate>
_no_actual_name(42)
<matthewcroughan>
Has anyone got an example of let/in being used in an actual package now?
<matthewcroughan>
zecnate: what's the need to say "_no_actual_name"
<simpson>
matthewcroughan: There's a massive syntactic tradition you're not seeing: ML. SML, Haskell, OCaml, and indeed Nix are all part of a long-standing usage of this pattern: https://en.wikipedia.org/wiki/Let_expression
<zecnate>
Toy example: `let othermod = import ./other-mod.nix; in othermod.make_a_package_definition("my-package")`
<matthewcroughan>
simpson: That's all I needed to hear :D
<matthewcroughan>
I thought this ought to be deeper than nix. I did not know where to look.
<zecnate>
matthewcroughan: In that python example the function gets called immediately. I gave it a funky name, because in `let / in` there's no name that sticks around.
<matthewcroughan>
in the same way as I think there are other languages that use `if` `fi` than shell.
<zecnate>
So in fact, it's closer to this python `(lambda a: 2 * a)(42)`
lordcirth has quit [Remote host closed the connection]
<matthewcroughan>
zecnate: yes, now I need an actual example, I understand the syntax
<matthewcroughan>
we can do math with it, but what else do people do with it in packages?
<zecnate>
In shell, `if` and `fi` are syntax to identify the start/end of the if-clause, but scoping is very different. Generally, most shell variables are globals.
lordcirth has joined #nixos
<matthewcroughan>
zecnate: yes, but in python they are not
<{^_^}>
[nixpkgs] @AndersonTorres pushed 2 commits to master: https://git.io/JUuE6
<matthewcroughan>
so basically, I understand this in a very screwed up way, because I actually did not know they were globals in shell, since I never think about scope
<matthewcroughan>
but I knew for a fact that they were not global in python
<matthewcroughan>
so to me, I think about scope from the perspective of Python, even when I'm doing shell, even though I shouldn't, lol.
<matthewcroughan>
so if I defined some variables inside of if/fi, in shell, then I wouldn't expect them to be global actually.
<matthewcroughan>
Are you saying that they in fact would be?
<matthewcroughan>
AH yes.. I have written some scripts that do that, like entrypoints in dockerfiles.
<matthewcroughan>
if/elif scripts that look for a global variable, then set yet another global variable if something is true in the env..
<zecnate>
-and also I can comment a specific binding.
<matthewcroughan>
yeah that makes sense
<matthewcroughan>
I'm saying, I can override your bits in my configuration.nix right?
sangoma has joined #nixos
<zecnate>
One thing about immutability is that those two expressions, with the let or here in the channel give the same result no matter what. Nothing can surprisingly change the bindings in the let. That's what immutability means.
<zecnate>
shell is very different, because if you say: `a = 42; setup; do_thingy "$a"` you have no guarantee that `setup` didn't change `a` when you weren't looking.
<matthewcroughan>
This command was given to me the other night by clev
<matthewcroughan>
clever: *
<matthewcroughan>
This command looks to me like it overrides the builtins.fetchGit(), the cmakeFlags(), etc.
<zecnate>
Hrm, sorry I don't understand overrides yet. I think the "standard" way to do things in `nixpkgs` is to define functions that take package derivations as arguments, maybe with defaults, then the caller can choose to swap out pacakges, or something like that.
<clever>
matthewcroughan: it overrides src and cmakeFlags
<matthewcroughan>
which are variables in the dolphinEmu nixpkg?
<matthewcroughan>
Which are defined by let/in?
<zecnate>
In the example I linked, I specifically want to exclude overrides, so I just evaluate to that very specific import.
<zecnate>
So with my understanding of nix, the way you would "override" something given that sets are immutable is you create a new set with the default/fallback values plus some new override values.
<clever>
but its now got quotes inside a quoted string, and it gets ugly
palo1 has joined #nixos
<matthewcroughan>
clever: where is it that you learned?
<matthewcroughan>
I tried nix-pills but it seems outdated?
mir100 has quit [Ping timeout: 240 seconds]
<clever>
matthewcroughan: i learned nix before the pills existed
<zecnate>
Yeah, what happens is that this whole file evaluates to a function that takes a bunch of parameters. Somewhere else in `nixpkgs` (probably in a file called `all-packages.nix`) that function gets called and all of those parameters get passed in. The function returns a set, which is similar to a json object with a bunch of things defined, IIUC.
<matthewcroughan>
nix-env by default doesn't manage the system?
<clever>
matthewcroughan: no, nix-env only manages ~/.nix-profile on one user
<matthewcroughan>
okay, so why are these things separate?
<clever>
matthewcroughan: so you can use nix-env without being an admin
<clever>
matthewcroughan: so you can use nix-env without being on nixos (it even works on darwin)
<zecnate>
matthewcroughan: fwiw, I've found the nix documentation to be a bit hard to penetrate. I am fairly new to it where I'm starting a new project about a week ago, but I'm also really familiar with the kind of language that nix expressions are.
<matthewcroughan>
I just did `sudo nix-env --list-generations` and got even more confused
<matthewcroughan>
hah
<clever>
matthewcroughan: that would be roots ~/.nix-profile, stuff root installed with nix-env -i
<zecnate>
I've been pondering how to improve the docs. It could also be the way I read is … potentially uh, unique.
<clever>
matthewcroughan: each user, including root, has its own personal profile, none of them have any impact on the system profiles
<matthewcroughan>
I don't like that I have these random bits of state on my system :d
konobi has quit [Quit: konobi]
<matthewcroughan>
As I thought the point was to eliminate it
<clever>
matthewcroughan: then stop using `nix-env -i`
konobi has joined #nixos
<clever>
matthewcroughan: tools like home-manager can help to enforce that
<matthewcroughan>
my user "matthew" can access "emacs"
<matthewcroughan>
emacs is installed in the sudo nix-env
<matthewcroughan>
why?
<clever>
roots profile acts as a default for all users
<matthewcroughan>
nix-env -q of matthew does not show emacs installed
<clever>
do `which emacs` and you should see roots profile
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @kirelagin to master « prometheus: Unbreak IPv6 listenAddress »: https://git.io/JUuuZ
<matthewcroughan>
"
<matthewcroughan>
purpose-built. Nix only exists to be the language for Nix, the package manager. While people have occasionally used it for other use-cases, it is explicitly not a general-purpose language.
<matthewcroughan>
clever: "
<matthewcroughan>
Whoops.. did't mean that
SanchayanM has joined #nixos
<matthewcroughan>
Anyway, what are some of these general purpose uses for nix that people have tried?
<{^_^}>
[nixpkgs] @danieldk opened pull request #98373 → [20.09] tensorflow: Fix compilation with numpy 1.19.x → https://git.io/JUuuW
<clever>
but now there is a with, so b might be in x
<clever>
you wont know until you give it an x, and the answer can differ, depending on what x is
<matthewcroughan>
doesn't that mean it's not functional then?
Orbstheorem has quit [Ping timeout: 246 seconds]
<clever>
matthewcroughan: it is functional, its just a function, that takes an arg
<clever>
the `with` problem is more about this:
<clever>
with pkgs; let foo = "foo"; in fop
<clever>
if you mis-spell a variable from the let block, and such a variable happens to be a valid package, you get the wrong thing, instead of an error
<clever>
> src
<{^_^}>
<LAMBDA>
<clever>
> pkgs.src.meta.description
<{^_^}>
"Simple single-file revision control"
<clever>
for example, there is a package called "src", so if you try to do `src = src;` and then mistype src in the let block
<clever>
> let scr = "something important"; in { src = src; }
<{^_^}>
{ src = <CODE>; }
<clever>
> :p let scr = "something important"; in { src = src; }
<{^_^}>
{ src = <LAMBDA>; }
<clever>
thats not the src you wanted, and because of pkgs.src exists, it leaked in and covered the scr mistake
mariatsji has joined #nixos
mariatsji has quit [Remote host closed the connection]
mariatsji has joined #nixos
<matthewcroughan>
clever: okay, so to evaluate this
<zecnate>
If I change a derivation expression code, but it evaluates to exactly the same result as a previous `nix-build`, is that considered already cached? (All build inputs are unchanged.)
cr4y1 has joined #nixos
cr4y1 has quit [Remote host closed the connection]
cr4y1 has joined #nixos
Pidgeotto has joined #nixos
Pidgeotto has quit [Excess Flood]
<clever>
zecnate: yeah
Pidgeotto has joined #nixos
Pidgeotto has quit [Excess Flood]
Pidgeotto has joined #nixos
Pidgeotto has quit [Excess Flood]
cfricke has joined #nixos
<zecnate>
Woah dude. That blows my mind.
<zecnate>
That's awesome!
f0i has joined #nixos
<srhb>
zecnate: (The key is in "evaluates" -- that is, it produces the exact same drv)
Orbstheorem has quit [Ping timeout: 272 seconds]
<zecnate>
Ok, good to know.
<dminuoso>
zecnate: Roughly, a derivation is similar to a makefile in that it represents a way to build something for the nix store.
<dminuoso>
It is not important how you express that, but the actual value of that derivation
mmohammadi981261 has quit [Quit: I quit (╯°□°)╯︵ ┻━┻]
<dminuoso>
Feel free to look inside a derivation inside the nix store, this might help you understand better what a derivation is and why this caching works the way it does.
<zecnate>
I have a strong suspicion that as I'm learning nix and working on my project I'm reinventing a bunch of wheels.
<zecnate>
I think after I get it working, I'll learn how to streamline all my expressions and hopefully remove most/all build scripts using standard conventions.
<dminuoso>
(Note by derivation I do not mean the code `mkDerivation ...`, but the actual artifact that comes out of it)
<Peter_Storm>
Hello, can someone help me find where libgthread is located in nix? 😅
<Peter_Storm>
I read something about maybe having to do some patchelf stuff to make it available to my shell... but I’m in over my head 😅
<clever>
,locate libgthread
<{^_^}>
Found in packages: glib, glib.debug, signal-desktop
<clever>
Peter_Storm: its in glib
<Peter_Storm>
Oh, I have glib installed
<Peter_Storm>
Sorry
<Peter_Storm>
But opencv from Python doesn’t seem to be able to see it
<clever>
Peter_Storm: installing it wont make it available to everything, try `nix-shell -p glib`
<Peter_Storm>
I’ve exposed some paths in the shell hook
<clever>
did you add glib to the buildInputs ?
<Peter_Storm>
Nope, I’ll try that, thank you
<clever>
,libraries Peter_Storm
<{^_^}>
Peter_Storm: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<Peter_Storm>
Roger, thanks guys l, I’ll see if I can make it work
<Peter_Storm>
Yeah, it still doesn’t work :(
<Peter_Storm>
It’s opencv from Python that apparently can’t see it in the shell
<clever>
you may need to set LD_LIBRARY_PATH=${glib}/lib in the shellHook then
<Peter_Storm>
Ah makes sense, I’ll see if I can figure that out
<Peter_Storm>
Nope, that didn’t work either... maybe I’m doing it wrong?
<{^_^}>
[nixpkgs] @vbgl pushed commit from @Zimmi48 to master « ocamlPackages.zarith: 1.9 -> 1.10 »: https://git.io/JUuax
<Peter_Storm>
So its because I’m not exposing the libgthread file correctly
<Peter_Storm>
Other Python files
<clever>
if you `echo $LD_LIBRARY_PATH`, what is the path for glib?
<Peter_Storm>
It’s something in the store
<Peter_Storm>
But ah
<Peter_Storm>
The rest might not be correct
<Peter_Storm>
There’s another bin folder
<clever>
i think you want ${glib.out}
<clever>
/lib
<Peter_Storm>
Ah, I’ll try that :)
<Peter_Storm>
Yes!
<Peter_Storm>
Thank you!
<Peter_Storm>
Now it needs another file at least, haha, I hate this, but it worked what you suggested :)
nixuser has joined #nixos
zecnate has quit [Remote host closed the connection]
sangoma has quit [Read error: Connection reset by peer]
thc202 has joined #nixos
zecnate has joined #nixos
<zecnate>
I'm not passing `builder` to a `mkDerivation` for an autotools project. Can I pass specific `./configure` options? How? Where do I read about this?
<clever>
zecnate: configureFlags = [ "--foo" ];
Darkmatter66_ has joined #nixos
<zecnate>
Also, I have some common patterns for some autotools dependencies, but I am currently writing manual builders. One pattern: "apply a bunch of patches before ./configure stage".
Darkmatter66 has quit [Ping timeout: 260 seconds]
<zecnate>
clever: Thanks. Where is that documented?
<{^_^}>
[nixpkgs] @peti pushed to master « untrunc: update to latest git version »: https://git.io/JUuVX
knupfer has quit [Client Quit]
knupfer has joined #nixos
devalot has quit [Ping timeout: 264 seconds]
sputny has quit [Quit: sputny]
sputny has joined #nixos
<zecnate>
Different question: I want to make a derivation whose source is a git repo, and I want the `version` attr to be calculated based on git tags. Is this possible?
<zecnate>
The derivation expression is inside the git repo...
<clever>
zecnate: builtins.fetchGit ./. will return a set containing the git rev
<clever>
zecnate: lib.commitIdFromGitRepo can also do it
<zecnate>
Nice! That's a start.
<zecnate>
How can I dump all attrs of a set? I've been playing with `pkgs.lib.debug` but often they are unevaluated thunks...
zecnate has quit [Remote host closed the connection]
<clever>
you can run nix repl on the file, and then just eval any attr
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
orivej has joined #nixos
knupfer has quit [Read error: Connection reset by peer]
cr4y1 has quit [Read error: Connection reset by peer]
cr4y1 has joined #nixos
<reptarmigan>
Hey, I'm pretty new to nixos (installed it last night) I'm really liking it, I was wondering if anyone could help me figure out a funny ecryptfs issue, or more specifically a mount argument issue
cr4y1 has quit [Read error: Connection reset by peer]
cr4y1 has joined #nixos
<reptarmigan>
If i try to recover my ubuntu ecryptfs home directory using the ecryptfs-recover-private command I have mount returning "mount: Max 2 arguments"
domogled has quit [Remote host closed the connection]
<{^_^}>
[nixos-homepage] @garbas pushed 2 commits to master: https://git.io/JUuo9
cr4y1 has quit [Read error: Connection reset by peer]
<{^_^}>
[nixos-homepage] @garbas merged pull request #548 → nix-shell in recordings should be (green) the same → https://git.io/JUuoK
<{^_^}>
[nixos-homepage] @garbas pushed 2 commits to master: https://git.io/JUuoQ
<{^_^}>
[nixos-homepage] @garbas pushed 0 commits to nix-shell-in-recordings: https://git.io/JUuo7
astylian has quit [Remote host closed the connection]
veleiro has quit [Ping timeout: 264 seconds]
cr4y1 has joined #nixos
<{^_^}>
[nixos-homepage] @garbas pushed to h1-space-on-mobile « on mobile page have less margin-bottom between page-title and content »: https://git.io/JUuKf
<{^_^}>
[nixos-homepage] @garbas opened pull request #549 → on mobile page have less margin-bottom between page-title and content → https://git.io/JUuKU
sigmundv_ has joined #nixos
pf has quit [Ping timeout: 264 seconds]
pf has joined #nixos
werner291 has joined #nixos
<Ke>
don't ask to ask, just state your problem
<Ke>
reptarmigan: if you just use mount command, nixos is like any other distro
<{^_^}>
[nixos-org-configurations] @edolstra pushed 2 commits to master: https://git.io/JUuK7
<{^_^}>
[nixos-org-configurations] @edolstra merged pull request #122 → removing nixos-org folder since the website is moved to netlify → https://git.io/JURtF
<{^_^}>
[nixos-org-configurations] @edolstra pushed 0 commits to remove-nixos-org: https://git.io/JUuK5
pingiun has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bahamas has quit [Ping timeout: 272 seconds]
sputny1 has joined #nixos
<Peter_Storm>
,locate GLU
sputny1 has quit [Client Quit]
<{^_^}>
Found in packages: openscenegraph, haskellPackages.GLURaw, haskellPackages.OpenGL, python27Packages.pyopengl, python37Packages.pyopengl, python38Packages.pyopengl
knupfer has quit [Read error: Connection reset by peer]
joesventek has quit [Quit: Quit]
terrorjack has joined #nixos
Peter_Storm has quit [Quit: Connection closed for inactivity]
nikivi has joined #nixos
dstzd has joined #nixos
dstzd has joined #nixos
dstzd has quit [Changing host]
joesventek has joined #nixos
orivej has quit [Ping timeout: 256 seconds]
<{^_^}>
[nixos-homepage] @github-actions[bot] pushed commit from GitHub Actions to master « Update flake.lock and blogs.xml [ci skip] »: https://git.io/JUuMf
<{^_^}>
[nixpkgs] @oxalica opened pull request #98387 → nix-prefetch: fix compatibility with nixUnstable again → https://git.io/JUuMJ
alexherbo2 has joined #nixos
<kolaente_>
Hey there, I'm trying to get a newer kernel on my system but can't get it to work. I simply assumed sticking boot.kernelPackages = pkgs.linuxPackages_latest; in my configuration.nix would be enough, but I get compilation errors (?) about time_t not being known when rebuilding
<kolaente_>
This seems a bit odd to me since I thought the kernels would be pre built
<kolaente_>
But it seems I missed some header files somewhere?
<{^_^}>
[nixpkgs] @primeos pushed commit from @meutraa to master « androidStudioPackages.{dev,canary}: 4.2.0.10 -> 4.2.0.11 »: https://git.io/JUuMW
cfricke has quit [Quit: WeeChat 2.9]
gustavderdrache has joined #nixos
iqubic` has left #nixos ["ERC (IRC client for Emacs 28.0.50)"]
karantan has joined #nixos
<karantan>
hey, is anyone interested in adding goss package to nix packages? (goss is a quick and easy server validation tool. see https://github.com/aelsabbahy/goss)
<LambdaDuck>
If I want to fix an issue on a package, should I open an issue for it first and then submit a pull request, or is just the pull request sufficient?
<Denommus>
if anyone can give me insight I'd appreciate
ydlr has joined #nixos
<lordcirth>
I need to somehow pass the nixpkgs-unstable into the ./ipfs.nix file?
<infinisil>
lordcirth: Ah true, I don't use flakes myself, but you'd probably add another nixpkgs input with an alternate name
<lordcirth>
Yeah, adding the input is done, I just need to figure out how to use it
Denommus has quit [Quit: ERC (IRC client for Emacs 27.1)]
<infinisil>
lordcirth: I guess the easiest would be to just add a module in your flake.nix to the nixosSystem function that does `{ environment.systemPackages = [ inputs.altNixpkgs.foo ]; }`
<lordcirth>
infinisil, ok, so it built, but when I change to "environment.systemPackages = [ inputs.nixpkgs-unstable.ipfs-migrator ];" it says "attribute 'ipfs-migrator' missing". Do I need to do something to the repo to use it?
<{^_^}>
[nixpkgs] @doronbehar opened pull request #98400 → bump: init at 0.2.2 → https://git.io/JUudJ
<lordcirth>
inputs.nixpkgs-unstable.pkgs.ipfs-migrator didn't work either
<lordcirth>
And yes it does exist in unstable, I checked
dansho has quit [Remote host closed the connection]
tobiasBora has quit [Ping timeout: 256 seconds]
dansho has joined #nixos
kenran has joined #nixos
<NobbZ[m]>
[rain1](https://matrix.to/#/@freenode_rain1:matrix.org) depending on your exact use case you pack whatever you need from pip in a derivation and use that instead.
<rain1>
that sounds like a good system
<rain1>
so nix can actually subsume these PL specific package managers?
<symphorien[m]>
it does not do version constraint resolution, but if all the correct versions are in nixpkgs, then yes
<{^_^}>
[nixpkgs] @gebner pushed 2 commits to release-20.09: https://git.io/JUupV
<yurb>
It seems to have vendored libs; for a proper package they probably need devendoring, but for getting it running locally I'm fine with it for now
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @oxalica to release-20.09 « nix-prefetch: fix compatibility with nixUnstable again »: https://git.io/JUupr
<yurb>
However fetchFromGitHub doesn't do a recursive clone
<yurb>
Is it possible to get submodules with fetchFromGitHub?
<simpson>
yurb: To your immediate question, yes; pass `fetchSubmodules = true;` to fetchFromGitHub.
<bbigras>
yes
<yurb>
thanks a lot
<simpson>
In general, you'll probably want to patch out those vendored libraries whenever possible, just for security and modularity (and sanity); keeping them is fine if only the vendored versions work.
<{^_^}>
[nixpkgs] @jonringer merged pull request #97444 → rust-analyzer: 2020-08-24 -> 2020-09-14 and some clean-up → https://git.io/JUna5
<yurb>
simpson: I'll need to learn how to do that; currently I need to get it running so I can see if it's useful at all (for me); if I'll be using it long-term, I'll probably invest time in making a proper PR.
<simpson>
Ah, yes, the pain of not being sure if one even *wants* the package that one is preparing.
<yurb>
wow, it has Roboto and Font awesome inside...
<yurb>
Good it's not using Google Web Fonts (hopefully)
Thra11 has joined #nixos
<lejonet>
Hmm, anyone know what package append-initrd-secrets is from?
<{^_^}>
[nixpkgs] @jonringer merged pull request #94930 → Add KLU support to sundials → https://git.io/JJXFn
<{^_^}>
[nixpkgs] @jonringer pushed commit from @Enteee to master « isso: build from master »: https://git.io/JUuhR
mariatsji has quit [Remote host closed the connection]
<lejonet>
infinisil: I managed to unsegfault file by reinstalling it, I'm thinking that maybe there is a mismatch between the glibc that the binary was compiled for and what I have on my system atm (I guess I did stuff in a bit roundabout way, by upgrading the user-env before upgrading the system)
<{^_^}>
[nixpkgs] @jonringer pushed commit from @thiagokokada to master « pythonPackages.xlib: 0.25 -> 0.28 »: https://git.io/JUuhi
<evanjs>
coming back to the whole "thing marked as build-time dependency when it's actually a run-time dependency" again
<evanjs>
e.g. "what(): cannot read '/nix/store/73mlg7qng6ay99iarnvs6vrlly6fvrqd-new-modules/console', since path '/nix/store/73mlg7qng6ay99iarnvs6vrlly6fvrqd-new-modules' is not valid, at /etc/nixos/config/new-modules/default.nix:10:6"
<{^_^}>
[nixpkgs] @jonringer pushed commit from @lopsided98 to master « buildbot: 2.8.2 -> 2.8.4 »: https://git.io/JUuh1
<evanjs>
though, now, instead of being a problem after e.g. running nixos-option after a gc, it presents an issue when generating a VM
<{^_^}>
[nixpkgs] @anka-213 opened pull request #98415 → wordnet: Fix darwin build → https://git.io/JUuhy
h0m1 has joined #nixos
sxiii has quit [Ping timeout: 264 seconds]
<evanjs>
Even if I specify NIXOS_CONFIG to the deployed configuration directory, since the derivation wasn't considered a runtime dependency, it does not exist on the VM, and cannot be queried until the system is rebuilt, etc
<lejonet>
infinisil: so now all I have segfault is the append-initrd-secrets, but I've tried all the individual things that script runs and none of them segfault, but the script itself segfaults somehow
<evanjs>
also ping infinisil 😜
<evanjs>
(I know I've asked about this probably several times now 🤪)
<evanjs>
inspecting my current-system with nix-tree, it does seem that the modules folder does not appear in the list of dependencies (why-depends mode)
__monty__ has joined #nixos
<infinisil>
lejonet: No idea about what could be the problem, but it might be a good idea to change nixpkgs to not execute that file if there's no initrd secrets
<lejonet>
infinisil: I don't really know how to make it not execute that file, the variable that supposedly makes it run is an empty attrset (which is the default)
<lejonet>
and that is supposed to make it not run...
<__red___>
Is there a clang equivalent of stdenv that I can just swap out to swap compilers?\
<lejonet>
infinisil: so I should nuke that store path or?
<infinisil>
lejonet: Check out `system/activation/top-level.nix` where `append-initrd-secrets` is created. See if you can `optionalString` that command to make it not run when the relevant option is {}
<lejonet>
cole-h: interesting part there is that the code there says that if config.boot.initrd.secrets == {}, it should put an exit 0 high up and it just quit, which is there, so I have no idea how it manages to segfault in like 4 lines of bash lol
<lejonet>
I guess it might actually be test in bash that segfaults, but I can run the bash binary it references without it segfaulting, so I'm very mystified lol
karantan has joined #nixos
proofofkeags has joined #nixos
<pikajude>
what's the easiest way to copy files into a nixos container
<pikajude>
from the host
justanotheruser has quit [Ping timeout: 240 seconds]
<__red___>
because they're used to things like major revisions of things like RedHat et al breaking midway through a major rev upgrade and then them not being able to go backwards or forwards
<lejonet>
infinisil: so I think I've found the root cause of it all, but I have no idea how to fix it, apparently the libraries the bash binary is linked to, is a mismash of glibc-2.30 and glibc-2.31, probably because I updated my user-env before updating the system...
karantan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cole-h>
Specifically: `At buildtime, any occurence of this string in an derivation attribute willbe replaced with the concrete path in the Nix store of the output [xyz].`
<red_>
got it
<red_>
it's running
<{^_^}>
[nixpkgs] @Ma27 merged pull request #98350 → spotify: support --force-device-scale-factor for high-DPI displays → https://git.io/JUuGe
fendor has quit [Read error: Connection reset by peer]
<xensky>
ok i think i've got a weird problem going on.. i'm trying to run a java program that uses a precompiled rust executable for parsing. on fedora, this ran just fine having java installed. opened the same jar+executable on nixos, and it says the dependency file cannot be found. if i cd to its lib folder and try to ./ run that file, it also says it's not found. but it exists with a filesize.
<__red__>
xensky: Your executable can't find the deps
<__red__>
xensky: run ldd <libraryfile>
<__red__>
or executable
<xensky>
ah i figured it was all included since it was precompiled. ldd found 7 dependencies, one of which didn't resolve. linux-vdso.so.1
<xensky>
is there a command to check which package provides this?
<manveru>
,locate linux-vdso.so.1
fendor has joined #nixos
<{^_^}>
Couldn't find in any packages
<euank>
xensky: linux-vdso is a "virtual shared object", it doesn't exist. It gets injected directly into shared memory
<xensky>
oh. so... is there anything i can do?
butcher has quit [Ping timeout: 256 seconds]
<euank>
What's probably wrong is the linker, ld.so, which is also embedded in the elf format
<euank>
`patchelf --print-interpreter` will probably print a path that isn't in the nix store for the binary
<{^_^}>
[nixpkgs] @raboof opened pull request #98425 → inkcut: fix by using the standard qt5 version → https://git.io/JUzkO
<euank>
Yup, that's the path the linker is at in every linux distro... except nixos. Patching that to the appropriate `/nix/store/...` path is probably what you want! The wiki link above talks you through how to do it
<xensky>
thanks, i'll try to walk through that guide
<euank>
And if you want to do it more properly, creating a derivation that downloads the file, throws autopatchelf at it, and drops it in `$out/bin` isn't too hard.
<xensky>
is there a wiki guide for that?
<euank>
sorta. There's documentation for autopatchelf (actually the same wiki page above), and there's documentation for how to make a derivation, but how to make a derivation for a specific package may be more or less involved
<xensky>
alright, i'll start digging in then and come back if i get stuck
cosimone_ has quit [Quit: Quit.]
cosimone has joined #nixos
<xensky>
is patchelf --set-interpreter supposed to take a while? mine is hanging
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rprije has joined #nixos
alp has joined #nixos
<euank>
It should be pretty quick in my experience
<xensky>
oh.. $NIX_CC doesn't seem to be defined
<euank>
Yeah, the docs aren't totally clear on that, but it expects you to have done `nix-shell -p patchelf stdenv.cc` to get it defined
<euank>
It's in there, just easy to miss that line
<__red__>
bingo - they're running a patched LLVM because they have a patch that fixes an upstream bug
<__red__>
ho hum
<xensky>
ah thanks euank i missed that
saschagrunert has quit [Remote host closed the connection]
<cole-h>
bqv: Do you know if there's a nix(1) equivalent to `nix-shell -p stdenv` that will set up the NIX_* env vars (e.g. NIX_CC like above)?
<xensky>
it runs now! thanks a bunch
<cole-h>
I tried with `nix shell` and `nix develop`, but neither appeared to work.
<unclechu>
hey, can i somehow add a local channel pointing to a nix file?
<unclechu>
something like `sudo nix-channel --add file:///etc/nixos/pkgs.nix nixos`?
<cransom>
unclechu: if you look at `nix-channel --list` and then `ls -la ~/.nix-defexpr/channels`, that might give you some ideas.
<euank>
unclechu: depending what you want it for, adding it to your nix path might be enough, i.e. `export NIX_PATH=mychannel=/path/to/my/channel:$NIX_PATH`
<unclechu>
except that the example i posted above doesn’t work since it’s trying to append `/nixexprs.tar.bz2` to the path
gustavderdrache has quit [Quit: Leaving.]
niksnut has quit [Ping timeout: 265 seconds]
<cransom>
if you definitely want it to be a channel, add a sym link to a repo in .nix-defexpr/channels/<channelname>. but otherwise, NIX_PATH as euank is the more typical method.
<unclechu>
euank: i want to stick to specific commit of nixpkgs while rebuilding my config and store this commit in the repo of my config.
<unclechu>
so when i update my config on an another machine i’m sure it has absolutely the same set of versions of the packages
<euank>
mm. There's multiple options here!
<euank>
So, what you want is almost exactly what nix flakes are trying to get you (check in a flake.lock, have that be exact versions, etc), and that will eventually replace channels...
<euank>
But another alternative would be to not use channels at all
lordcirth has quit [Read error: Connection reset by peer]
<unclechu>
euank: yes, i know, and i want to `<nixpkgs>` be replaced with my pick everywhere
<euank>
But the easiest thing probably is to avoid using nix channels and instead use NIX_PATH
<unclechu>
would the flakes do this for me?
<euank>
Flakes in theory do, but it's experimental and not as well documented, so it's more of a time investment to learn and figure out. Eventually that'll be the way to go.
<unclechu>
euank: hm.. thanks, i’ll try to find some info about it
<euank>
For now, NIX_PATH is probably the least painful path.
<unclechu>
but
<cransom>
i don't recommend flakes right now. they are still an experimental feature, no matter how much people talk about them.
lordcirth has joined #nixos
<unclechu>
i just forgot to mention that i want not only the specific commit of nixpkgs but also some my own overrides, like a couple of packages taken from unstable pick
<euank>
Note, nix-env doens't actually respect NIX_PATH iirc, and instead uses the nix defexpr instead
<unclechu>
i don’t use `nix-env` and not sure if i need it
<unclechu>
`nix-shell` was always enough for me
<euank>
cool, you should be solid with just the path then
<unclechu>
euank: i was able to run repl like this `NIX_PATH=nixos=/etc/nixos/nixos-channel/:nixpkgs=/etc/nixos/nixos-channel nix repl` and import a package from `<nixpkgs>`
<unclechu>
it fails with a bunch of errors like this one: `error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13`
<unclechu>
but if i try to rebuild the system: `NIX_PATH=nixos=/etc/nixos/nixos-channel/:nixpkgs=/etc/nixos/nixos-channel sudo nixos-rebuild switch`
<unclechu>
and a bunch of warnings: `warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring`
<__red__>
ho hum
spudly- has joined #nixos
<infinisil>
unclechu: What's in /etc/nixos/nixos-channel?
<unclechu>
i got errors for these paths: `nixpkgs/nixos`, `nixpkgs` and `nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix`
<infinisil>
Oh yeah I guess that doesn't work, because indeed NixOS needs a <nixpkgs/nixos> entry, and if you point `nixpkgs=/etc/nixos/nixos-channel`, this means that <nixpkgs/nixos> becomes /etc/nixos/nixos-channel/nixos
spudly has quit [Ping timeout: 264 seconds]
spudly- is now known as spudly
<unclechu>
hm... let me see
<unclechu>
if i can hack it
lux2 has quit [Read error: Connection reset by peer]
hellrazo1 has quit [Remote host closed the connection]
ilmu has quit [Remote host closed the connection]
<__red__>
so I specify src = fetchFromGithub{} etc etc...
<__red__>
and I have another file I need to download separately
<unclechu>
infinisil: nope, tried to create `/etc/nixos/nixos-channel/nixos` directory with `import ../../pkgs.nix` in `default.nix`. it did not help
<__red__>
so, somefile = fetchurl {etc}
<__red__>
I need to get it to actually do the download -
<infinisil>
That doesn't work because NixOS != pkgs
<__red__>
originally I thought that dependencies = [ somefile ] would be sufficient?
<infinisil>
You need to put something in /etc/nixos/nixos-channel/nixos that actually is a path to nixos
<infinisil>
Or rather, an expression that comes from nixpkgs/nixos
<__red__>
I guess I need to refer to somefile in some way in order to trigger the download of the file
<__red__>
but I don't know how - any suggestions as to how to solve this?
<__red__>
I've been grepping through nixpkgs for examples but yet to find an example of a package that uses more than one download file per package
<infinisil>
unclechu: Oh btw my messages above were for you
<__red__>
their build process uses "COMMAND git rev-parse --short HEAD" to create the "version" number - but when you fetchFromGithub it removes all the .git directories.
<unclechu>
but i’d still need to make some hacks for overrides
<__red__>
so I guess I need to hard-code that version number (which is fine since it's going to match my derivation anyways)
cr4y1 has quit [Ping timeout: 260 seconds]
mariatsji has joined #nixos
<unclechu>
infinisil: what would you do if you want to override Qt version for the system build?
<infinisil>
Qt version of what
<infinisil>
Everything?
<unclechu>
infinisil: yep, for everything
<infinisil>
unclechu: I'd probably add an overlay that does something like `qt5 = self.qt<whatever>; libsForQt5 = self.libsForQt<whatever>`
ManiacOfMadness has joined #nixos
mariatsji has quit [Ping timeout: 272 seconds]
<{^_^}>
[nixpkgs] @romildo opened pull request #98426 → hicolor-icon-theme: fix quoting shell variables in setup hook → https://git.io/JUztT
kreyren has quit [Remote host closed the connection]
kreyren_ has joined #nixos
<unclechu>
infinisil: okay, thanks. i guess i have to dive into overlays later. maybe i would be able to implement what i have in mind
<superherointj_>
I am asking because it does not behave well with Dark Reader. (My expectation is dark theme.)
superherointj_ has quit [Client Quit]
superherointj has quit [Quit: Leaving]
<euank>
__red__: the problems you're discussing are both problems I hit packaging k3s
<{^_^}>
[nixpkgs] @9999years opened pull request #98428 → puppy: init at 0.0.7 → https://git.io/JUzt1
<euank>
1. multiple files: as people said, you can just use `let src1 = fetchurl {}; src2 = fetchurl {}; in derivation, and that'll work just fine and let you reference those srcs
<euank>
2. for dependencies on git, it's best to try and hardcode versions and avoid git calls if you can, but there's a `leaveDotGit` option if you really need it.
<euank>
(it's not a pretty derivation, but it does both those things, and I don't have a straightforward better option)
cosimone has quit [Ping timeout: 260 seconds]
ManiacOfMadness has quit [Ping timeout: 246 seconds]
ManiacOfMadness has joined #nixos
<bloodyfish[m]>
anyone know how i can download the twitch app
lordcirth_ has quit [Remote host closed the connection]
Henson has joined #nixos
Rusty1 has joined #nixos
<Henson>
does anybody here use procmail on NixOS? I'm trying to make a .procmailrc file do some mail forwarding, and it's not working and I keep getting a "/bin/sh: : No such file or directory" error an am wondering if there's a variable in the .procmailrc file I need to set to make it work properly with NixOS. I've tried the SHELL variable already but it didn't do anything.