!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

888 Members
178 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@elonsroadster:matrix.orgelonsroadster
In reply to @j-k:matrix.org
why cant you create your own flake around the base flake and override rather than modifying the flake but not wanting to commit those modifications? I admit I read through the back and forth here and I don't quite see the usecase here

In the xmonad-contrib you want to import the develop.nix file if it exists but you dont want to commit it right? The whole point of flakes is you only use what you've commited to, what is reproducible, then to try to mutate that immutable environment doesnt work.

j-k: Your own flake in the same directory? I mean this is when you're working on developing the code in a repository that contains the flake. If you import the flake as you suggested you run in to two problems:

  • Is there even a way to run a flake in a directory if the "flake file" does not have the name flake.nix
  • When you import a flake it will generally "lock" the imported flake at a certain revision, this is bad if you are working on the code of that flake because it means you would have to restart the shell with a nix flake update every time you make a change. Not a nice workflow.
18:23:11
@j-k:matrix.orgj-k I was just going to say that's the pain of immutability but then I thought about racked but not staged yet files .... so nix flakes lets you run stuff on tracked but not staged yet files and just issues the line warning: Git tree '/home/jk/some/thing' is dirty, this is allowance is probably given as it'd be a PITA to stage every time you want to test a change. Maybe it could allow you to provide a file or dir as an extra dirty file or dir e.g --extra develop.nix and it could warn warning: Extra dirty content provided '/home/jk/some/thing/dirty/develop.nix' ? 🤷‍♂️ 18:31:54
@j-k:matrix.orgj-k * I was just going to say that's the pain of immutability but then I thought about tracked but not staged yet files .... so nix flakes lets you run stuff on tracked but not staged yet files and just issues the line warning: Git tree '/home/jk/some/thing' is dirty, this is allowance is probably given as it'd be a PITA to stage every time you want to test a change. Maybe it could allow you to provide a file or dir as an extra dirty file or dir e.g --extra develop.nix and it could warn warning: Extra dirty content provided '/home/jk/some/thing/dirty/develop.nix' ? 🤷‍♂️ 18:32:07
@elonsroadster:matrix.orgelonsroadster
In reply to @j-k:matrix.org
I was just going to say that's the pain of immutability but then I thought about tracked but not staged yet files .... so nix flakes lets you run stuff on tracked but not staged yet files and just issues the line warning: Git tree '/home/jk/some/thing' is dirty, this is allowance is probably given as it'd be a PITA to stage every time you want to test a change. Maybe it could allow you to provide a file or dir as an extra dirty file or dir e.g --extra develop.nix and it could warn warning: Extra dirty content provided '/home/jk/some/thing/dirty/develop.nix' ? 🤷‍♂️
j-k: Right I'm aware of that, but I think you are maybe missing my point. Your idea was to make a separate flake that IMPORTS the original flake, right?
18:55:17
@elonsroadster:matrix.orgelonsroadster In that case, you would still need to nix flake update every time any change is made for it to be reflected, since any imported flake is copied into the store when it is used as a dependency 18:56:02
@j-k:matrix.orgj-kyes that was the idea I posted. you said you didnt like the workflow. I was going to give up but then thought about the dirty behaviour and proposed a potential new feature18:56:26
@j-k:matrix.orgj-kmy 2nd idea has nothing to do with imports or the need to update the flake18:56:40
@elonsroadster:matrix.orgelonsroadsterI see, the seond thing was unrelated18:57:13
@elonsroadster:matrix.orgelonsroadsterYes actualy reading it now, the second thing is basically exactly what i would want18:57:31
@j-k:matrix.orgj-know that I think about it, it wouldnt solve the issue of adding new inputs but I guess it's a start19:29:39
@elonsroadster:matrix.orgelonsroadster
In reply to @j-k:matrix.org
now that I think about it, it wouldnt solve the issue of adding new inputs but I guess it's a start
Well it could if it was sort of also evaluated as a flake, except that i had direct access to the other flake
21:13:40
@yusdacra:nixos.devyusdacra changed their profile picture.22:23:36
13 Aug 2021
@j-k:matrix.orgj-k

what do I do when I want to build an array of derivations?

with https://github.com/06kellyjac/vim-git-overlay/blob/master/ci.nix i can do nix-build ci.nix -A buildOutputs and it builds a bunch of result-x but if I want to do that using flakes I'm getting stuck

I can do blah = pkgs.callPackage ./flake-ci.nix { }; in the root of the flake and it shows in the repl with buildOutputs as an array of derivations but idk how to build it
If I put it in packages it just doesnt show up in the repl and says there's no attribute with nix build .#whatever

10:14:43
@balsoft:balsoft.rubalsoft
In reply to @j-k:matrix.org

what do I do when I want to build an array of derivations?

with https://github.com/06kellyjac/vim-git-overlay/blob/master/ci.nix i can do nix-build ci.nix -A buildOutputs and it builds a bunch of result-x but if I want to do that using flakes I'm getting stuck

I can do blah = pkgs.callPackage ./flake-ci.nix { }; in the root of the flake and it shows in the repl with buildOutputs as an array of derivations but idk how to build it
If I put it in packages it just doesnt show up in the repl and says there's no attribute with nix build .#whatever

You should export it as a single derivation, e.g. with buildEnv
11:40:59
@j-k:matrix.orgj-k thanks balsoft 12:11:48
@ineol:matrix.orgineol joined the room.12:43:56
@jackinloadup:matrix.orgjackinloadup joined the room.23:01:35
15 Aug 2021
@yusdacra:nixos.devyusdacra changed their profile picture.03:21:23
@papojari:artemislena.eupapojari changed their display name from papojari 🏳️‍🌈 to papojari.09:49:13
@papojari:artemislena.eupapojari changed their profile picture.09:50:36
@papojari:artemislena.eupapojari changed their display name from papojari to fritz.10:07:04
@papojari:artemislena.eupapojari changed their display name from fritz to papojari.10:07:18
@papojari:artemislena.eupapojari left the room.17:36:02
17 Aug 2021
@hexagonk:halogen.cityhexagonk set a profile picture.05:57:07
@b:chreekat.netchreekat changed their display name from bryan to chreekat.19:59:04
18 Aug 2021
@roosemberth:orbstheorem.chRoos joined the room.18:46:15
19 Aug 2021
@6aa4fd:tchncs.de6aa4fd joined the room.05:55:12
20 Aug 2021
@6aa4fd:tchncs.de6aa4fd set a profile picture.01:13:04
21 Aug 2021
@polykernel:kde.orgpolykernel left the room.01:51:10
22 Aug 2021
@yusdacra:nixos.devyusdacra changed their profile picture.15:49:00

Show newer messages


Back to Room ListRoom Version: 6