!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

886 Members
177 Servers

Load older messages


SenderMessageTime
10 Oct 2021
@Las:matrix.orgLas colemickens 🏳️‍🌈: builtins.attrNames (overlay null null) 12:15:28
@lovesegfault:matrix.orglovesegfault

Is there some reason why flakes don't "discover" the flake.nix upwards into the directory structure?

It's annoying that nix build doesn't work in nested dirs and I have to do nix build ../../.. or w/ae

23:16:15
@lovesegfault:matrix.orglovesegfault *

Is there some reason why flakes don't "discover" the flake.nix upwards into the directory structure?

It's annoying that nix build doesn't work in nested dirs and I have to do nix build ../../.. or w/e

23:16:16
@lovesegfault:matrix.orglovesegfault Like, I feel it's pretty common for tools (e.g. Cargo) to just go upwards into the Git repo looking for the build file (e.g. Cargo.toml) 23:16:48
12 Oct 2021
@florian:web3.foundationFlorian | W3F
In reply to @colemickens:matrix.org
but how do you know the names of the packages to return in the packages attribute without duplicating? I guess I could instansiate the overlay with fake nixpkgs and then see what the attrNames and filter on those. sounds tedious.
My overlays often just returns all packages in a separate attrset, that I then return as packages.<system> = pkgs.<flake-name>.
13:33:42
@florian:web3.foundationFlorian | W3F Or you could just parameterize your overlay.nix to either return an overlay or a package attrset. 13:34:39
@florian:web3.foundationFlorian | W3F
In reply to @Las:matrix.org
Florian | W3F - OoO Mon/Tue: Pretty sure that was reverted due to various issues.
I have to look this up. Personally I would increase source control integration in nix.
13:36:59
@florian:web3.foundationFlorian | W3F
In reply to @Las:matrix.org
Florian | W3F - OoO Mon/Tue: Pretty sure that was reverted due to various issues.
* To bad, personally I would increase source control integration of nix.
13:37:51
@florian:web3.foundationFlorian | W3F colemickens 🏳️‍🌈: There is also flake-utils-plus 13:50:09
13 Oct 2021
@colemickens:matrix.orgcolemickens 🏳️‍🌈#5112 is soul-crushing00:04:48
@colemickens:matrix.orgcolemickens 🏳️‍🌈also, I just can't with the flake utils repos. I'd much rather see like 4 things move into builtins and be done with it.00:05:09
@colemickens:matrix.orgcolemickens 🏳️‍🌈I understand why they're a thing but they make flakes look and feel like way more than it is, and I'm more concerned with selling existing Nix people on flakes rather than showing off how frameworky flakes can be but that's all a strong opinion loosely-held00:06:00
@alxanyae:matrix.orgAlexandra changed their display name from Alex to Alexandra.00:53:44
@blaggacao:matrix.orgDavid Arnold (blaggacao) niksnut https://github.com/NixOS/nix/issues/5112#issuecomment-941745100 might be a release blocker. 02:29:41
@blaggacao:matrix.orgDavid Arnold (blaggacao)(well, at least as far as flakes would be concerned 🙂)02:30:15
@tomberek:matrix.orgtomberek colemickens 🏳️‍🌈: i almost always recommend people learn by not utilizing FUP/flake-utils/etc at all until they build up an understanding and actually want the ergonomics based on an informed choice. 03:37:41
@cdepillabout:matrix.orgcdepillabout
In reply to @colemickens:matrix.org
#5112 is soul-crushing

Maybe I don't quite understand the issue, but what is important to you about this? I thought that Eelco's response here made sense, since it seems like most people would want nix build to build the package (even if means having to mutate the flake.lock file). What sort of situations does this cause you problems?

I could definitely understand wanting some generic Nix flag like --dont-update-flake-lock that will throw an error if there are inputs in flake.nix that are not in flake.lock.

04:14:23
@colemickens:matrix.orgcolemickens 🏳️‍🌈No other package management tool changes your lock file out from underneath you.07:07:59
@colemickens:matrix.orgcolemickens 🏳️‍🌈I haven't written this up, but imo it's not hard.07:08:07
@colemickens:matrix.orgcolemickens 🏳️‍🌈Hash the flake.nix->inputs, store that in the lock. 07:08:16
@colemickens:matrix.orgcolemickens 🏳️‍🌈Any time the user updates the flake without updating the lock file, you can easily detect and spit out a big ole fat warning.07:08:31
@colemickens:matrix.orgcolemickens 🏳️‍🌈 Otherwise, updates to hermetic lock files should be explicit. 07:08:47
@colemickens:matrix.orgcolemickens 🏳️‍🌈there are examples given in the thread where it could change when a user isnt expecting it. Just because I add a dep doesn't mean I want to update everything, on and on.07:09:11
@lvkm:matrix.orglvkm
In reply to @colemickens:matrix.org
No other package management tool changes your lock file out from underneath you.
colemickens 🏳️‍🌈: which package manager doesn't? I pretty sure cargo and poetry do add missing dependencies to their lock files
07:32:22
@balsoft:balsoft.rubalsoftRedacted or Malformed Event07:39:33
@balsoft:balsoft.rubalsoft Anyhow, just add --no-write-lock-fileto your alias for nix build if that's such an issue. 07:40:00
@balsoft:balsoft.rubalsoft * Just add --no-write-lock-fileto your alias for nix build if that's such an issue. 07:42:43
@cdepillabout:matrix.orgcdepillabout
In reply to @colemickens:matrix.org
No other package management tool changes your lock file out from underneath you.
Huh, I thought this was a common thing for package management tools to do. For instance, with stack, if you add a new dependency to extra-deps and run stack build, it will update your stack.yaml.lock file and add an entry for the new dependency you just added.
07:48:41
@balsoft:balsoft.rubalsoftOff the top of my head, I can think of only one package manager that doesn't do that, and that's npm07:49:29
@balsoft:balsoft.rubalsoft(and maybe other nodejs stuff)07:49:37

Show newer messages


Back to Room ListRoom Version: 6