!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

903 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
23 Jan 2025
@alexb:homeserver.ballmerlabs.netalexb joined the room.09:58:10
@czl92783719:mozilla.orgCarter Zhang[M]What environmental variables should be added after installing Nix on Debian GNU/Linux? 11:51:12
@sandro:supersandro.deSandro 🐧the installer places a script to source in /etc/profile or so. Should be visible in the log13:11:55
@sandro:supersandro.deSandro 🐧* the installer places a script to source in /etc/profile or so. Should be visible in the logs13:11:57
@viperml:ayats.org@viperml:ayats.org changed their profile picture.14:02:33
@viperml:ayats.org@viperml:ayats.org changed their profile picture.14:03:09
24 Jan 2025
@sophie:nue.soopy.moesoopyc (she/it) changed their profile picture.11:47:24
@nulleric:matrix.orgnulleric joined the room.14:56:07
@userblackbox:matrix.orghexadecimal_dinosaur joined the room.19:06:34
25 Jan 2025
@trofi:matrix.orgtrofi Does nix have a built-in to check if the path is/will-be in nix store? Right now nixpkgs tries to use regex against /nix/store like https://github.com/NixOS/nixpkgs/blob/e224f1b3db62680d7bae444717d0a733d372b556/lib/types.nix#L580 and fails miserably on strings built from CA derivations as they don't have the prefix: https://github.com/NixOS/nixpkgs/pull/375961#issuecomment-2613547575 06:35:28
@aloisw:julia0815.de@aloisw:julia0815.de changed their profile picture.10:22:11
@kranzes:matrix.orgIlan Joselevich (Kranzes)We also have lib.isStorePath, not sure why the type isn't using it15:05:30
@trofi:matrix.orgtrofiAh, nice! That one seems to work.19:11:32
@trofi:matrix.orgtrofi Tried to use it and it fails: isStorePath only returns true for exactly the store dirs, like /nix/store/foo, but not files within them like /nix/store/foo/bin/bar. 19:16:30
26 Jan 2025
@kranzes:matrix.orgIlan Joselevich (Kranzes)Can you not just do lib.hasPrefix builtins.storeDir01:13:18
@aloisw:julia0815.de@aloisw:julia0815.de That would match slightly more stuff (/nix/store itself and hidden files/subdirectories). Also it does not fix the issue at hand. 07:14:54
@trofi:matrix.orgtrofi

No, CA derivations don't have it as a prefix:

nix-repl> hello.outPath
"/1121rp0gvr1qya7hvy925g5kjwg66acz6sn1ra1hca09f1z5dsab"
12:41:26
@kranzes:matrix.orgIlan Joselevich (Kranzes)So what's there to check that it's just /$sha256?13:14:27
@trofi:matrix.orgtrofi "^/[A-Za-z0-9]{52}.*" 13:18:42
@trofi:matrix.orgtrofi Proposed the nixpkgs workaround as https://github.com/NixOS/nixpkgs/pull/377007 15:38:08
@kranzes:matrix.orgIlan Joselevich (Kranzes)Ngl i kinda dislike it15:39:57
@kranzes:matrix.orgIlan Joselevich (Kranzes) It gets rid of a lot of strictness just to support an experimental feature that almost nobody uses and that is implemented pretty badly 15:40:42
@kranzes:matrix.orgIlan Joselevich (Kranzes) You shouldn't punish the vast majority of nix users just because CA paths are represented stupidly 15:41:20
@emilazy:matrix.orgemilywhy are they not rooted in the store anyway?16:05:17
@emilazy:matrix.orgemilyusing a path that might exist, in a namespace not owned by Nix, seems weird.16:05:29
@trofi:matrix.orgtrofiThey are invalid paths anyway :)16:16:51
@aloisw:julia0815.de@aloisw:julia0815.de
In reply to @emilazy:matrix.org
using a path that might exist, in a namespace not owned by Nix, seems weird.
If they are unpredictable, they're very unlikely to exist.
17:19:04
@aloisw:julia0815.de@aloisw:julia0815.de (Unlike, say /__corepkgs__ if you really want to fool Nix.) 17:19:18
@emilazy:matrix.orgemily do I want to know what /__corepkgs__ is for? 18:10:22
@jade_:matrix.orgjade_
In reply to @emilazy:matrix.org
do I want to know what /__corepkgs__ is for?
hack for implementing <nix/fetchurl.nix> being resolved
18:19:03

Show newer messages


Back to Room ListRoom Version: 6