!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

891 Members
180 Servers

Load older messages


SenderMessageTime
2 Oct 2021
@balsoft:balsoft.rubalsoftBut I wonder why I never noticed this before flakes17:14:26
@tomberek:matrix.orgtomberek Well…. It’s a gotcha. And easy to mess up. Not sure what would help fix it in a user-friendly way. 17:15:08
@balsoft:balsoft.rubalsoft Oh, ok, even more interestingly .source = inputs.nixpkgs works fine (this is on my personal system) 17:15:31
@balsoft:balsoft.rubalsoftAha, I think now I understand why it's not in runtime dependencies -- it's not in dependencies at all, so Nix doesn't even try scanning for its hash.17:16:43
@balsoft:balsoft.rubalsoft
In reply to @balsoft:balsoft.ru
Oh, ok, even more interestingly .source = inputs.nixpkgs works fine (this is on my personal system)
That's because toString inputs.nixpkgs is a string with context
17:18:27
@balsoft:balsoft.rubalsoft
In reply to @tomberek:matrix.org
Well…. It’s a gotcha. And easy to mess up. Not sure what would help fix it in a user-friendly way.
What's the problem with making toString /some-path return a string with context?
17:18:54
@balsoft:balsoft.rubalsoftOh, ok, that's probably because it would then break some stuff since you can't pass strings with contexts around as easily, e.g. as derivation names, correct?17:19:32
@tomberek:matrix.orgtomberek/some-path is not always in the store17:23:12
@balsoft:balsoft.rubalsoft I guess I'm saying it should work the same as "${/some-path}" (which copies it to the store) 17:24:06
@tomberek:matrix.orgtomberekThis is from 2005: https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L3097-L310517:30:02
@balsoft:balsoft.rubalsoftAha, yes, I see why I'm wrong on that part17:30:39
@balsoft:balsoft.rubalsoftIt would break a lot of useful path operations...17:30:48
@balsoft:balsoft.rubalsoftI remember now17:30:51
@balsoft:balsoft.rubalsoftThanks!17:31:03
@balsoft:balsoft.rubalsoft(I am kind of ashamed right now because now I clearly remember fiddling with string interpolation vs. toString and figuring out the difference...)17:31:36
@tomberek:matrix.orgtomberekIt does come up often. Especially with flakes for some reason (maybe just more people? or more interesting uses being experimented with?)17:31:53
@balsoft:balsoft.rubalsoftPerhaps it should be documented more prominently?17:41:51
3 Oct 2021
@cdepillabout:matrix.orgcdepillabout joined the room.12:54:19
@chanley:matrix.orgCharlie Hanley joined the room.14:55:04
@andrew:mtx.rew.laandrew joined the room.19:59:40
4 Oct 2021
@j-k:matrix.orgj-k set a profile picture.15:07:38
@cafkafk:matrix.orgcafkafk joined the room.19:10:53
@edrex:matrix.orgedrex

i'm trying unsuccessfully to upgrade my nixUnstable to get the fix for https://github.com/nix-community/nix-direnv/issues/113
I installed it with nix-env.

❯ nix upgrade-nix => error: directory '/home/eric/.nix-profile/bin' does not appear to be part of a Nix profile
~ ❯ nix-env -iA nixpkgs.nixUnstable => error: profile '/nix/var/nix/profiles/per-user/eric/profile' is incompatible with 'nix-env'; please use 'nix profile' instead
21:34:01
@edrex:matrix.orgedrexwhat should I be doing here?21:34:16
@edrex:matrix.orgedrex nix profile list => 0 - - /nix/store/nxbibr9m3pppjydlylyysja2m1gq6774-nix-2.4pre20210802_47e96bb so nix doesn't know how it got the nix flake 21:37:29
5 Oct 2021
@colemickens:matrix.orgcolemickens 🏳️‍🌈 edrex: nix-direnv was patched directly to fix this as I understand it 08:35:25
@sudoreboot:matrix.orgHrafn Blóðbók joined the room.09:14:11
@alxanyae:matrix.orgAlex joined the room.13:31:33
@edrex:matrix.orgedrexI'm seeing it outside direnv, trying to `nix develop`. There's an issue for it but I'm not on my laptop16:50:33
@edrex:matrix.orgedrexhttps://github.com/NixOS/nixpkgs/issues/13815717:56:48

There are no newer messages yet.


Back to Room ListRoom Version: 6