!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

891 Members
For people hacking on the Nix package manager itself192 Servers

Load older messages


SenderMessageTime
26 Oct 2025
@fzakaria:one.ems.hostfzakariahttps://github.com/NixOS/nixpkgs/blob/nixos-25.05/pkgs/by-name/pr/pre-commit/package.nix Nothing looks out of the ordinary22:41:14
@winter:catgirl.cloudWinter i don’t see a sandboxProfile there indeed — can i get a nix derivation show please? :) 22:51:36
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hmmm, did python packages switch to structuredAttrs?22:53:18
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I'm looking at the code that this message originates from and I'm suspicious22:53:44
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)

Ah, I think I know what's up. pre-commit needs dotnet, but it has:

    # fixes: Could not load ICU data. UErrorCode: 2
    propagatedSandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin ''
      (allow file-read* (subpath "/usr/share/icu"))
      (allow file-read* (subpath "/private/var/db/mds/system"))
      (allow mach-lookup (global-name "com.apple.SecurityServer")
                         (global-name "com.apple.system.opendirectoryd.membership"))
    '';

23:00:07
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
      "__sandboxProfile": "(allow file-read* (subpath \"/usr/share/icu\"))\n(allow file-read* (subpath \"/private/var/db/mds/system\"))\n(allow mach-lookup (global-name \"com.apple.SecurityServer\")\n                   (global-name \"com.apple.system.opendirectoryd.membership\"))\n ",
23:02:47
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Really weird that it gets propagated that far: https://github.com/NixOS/nixpkgs/blob/5754cad82cf6180cfc5f147b32dd111fd4222c8e/pkgs/development/compilers/dotnet/build-dotnet.nix#L186-L19123:03:57
@winter:catgirl.cloudWinternot exactly that surprising?23:05:39
27 Oct 2025
@volth:matrix.orgvolth

How would you read a <| b |> c ?

(a <| b) |> c or a <| (b |> c)

Currently it is syntax error for some reason.

02:26:41
@volth:matrix.orgvolth I am for the second, e.g.
fetchurl <| [repo1 repo2 repo2] |> (repo: "${repo}/someurl.tar.gz")
02:26:46
@volth:matrix.orgvolth

chatgpt says

In languages that support both (e.g. F#), the binding strength is such that:

<| has lower precedence (binds less tightly) than |>.

Both are right-associative.

so the verbot to use them both in the same expression is unique to Nix

02:32:04
@fzakaria:one.ems.hostfzakaria Sergei Zimmerman (xokdvium): i was AFK -- i saw the message; not sure what the fix is 03:26:56
@fzakaria:one.ems.hostfzakariahow did you track it down to dotnet ? Should I strip out dotnet from it ?03:27:27
@fzakaria:one.ems.hostfzakaria

ok I did

    extra_nix_config: ${{ matrix.os == 'darwin' && 'sandbox = "relaxed"' || 'sandbox = true' }}
03:38:45
@brainworms2002:matrix.orgSunny || ☀️🪱 joined the room.14:21:57
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) Philip Taron (UTC-8): we should do https://github.com/NixOS/nixpkgs/pull/396451 in nix repository. GHA is getting barely enough attention. I'd appreciate your expertise from nixpkgs CI. 16:21:31
@fzakaria:one.ems.hostfzakaria I noticed when I put the wrong hash for a FOD -- the nix build takes way longer than when it's correct 18:55:58
@fzakaria:one.ems.hostfzakariait seems to hang on the download.tar.gz18:56:06
@toonn:matrix.orgtoonn After already having run the build with the correct hash once? 19:08:55
@djspacewhale:4d2.orgGarrett joined the room.20:10:09
@backtail:matrix.orgbacktail joined the room.20:29:45
@backtail:matrix.orgbacktail

Hey peeps, I unknowingly ran into the leaveDotGit bug of unpredictable hash generation for nix derivations. I patched the dependency, but now ofborg says that my provided hash is wrong:
´´´bash
error: hash mismatch in fixed-output derivation '/nix/store/q59g9bk2kwh20sr8ir00gz5d5yjkb75r-source.drv':
specified: sha256-HoqFBkxXlmbWaFPOVvO0zUhlDBVzz++T6Fgf0MAuyao=
got: sha256-rcIbtIXTm1sNMCbs6W5DS/9KeMkWWhUdwReW++nW2Qc=
error: 1 dependencies of derivation '/nix/store/q5izjyv5iv1h0zdc06my4dp07wvv9j76-KnobKraft-orm-2.7.1.drv' failed to build
´´´

The point that I don't understand is that every architecture, aarch64, x64_86, etc. all have different hashes. However, I just want to build it for x64_86_linux. So how do I tell ofborg to only build on one architecture and why does the hash that works locally not work with ofborg?

20:33:55
@backtail:matrix.orgbacktail *

Hey peeps, I unknowingly ran into the leaveDotGit bug of unpredictable hash generation for nix derivations. I patched the dependency, but now ofborg says that my provided hash is wrong:

´´´
error: hash mismatch in fixed-output derivation '/nix/store/q59g9bk2kwh20sr8ir00gz5d5yjkb75r-source.drv':
specified: sha256-HoqFBkxXlmbWaFPOVvO0zUhlDBVzz++T6Fgf0MAuyao=
got: sha256-rcIbtIXTm1sNMCbs6W5DS/9KeMkWWhUdwReW++nW2Qc=
error: 1 dependencies of derivation '/nix/store/q5izjyv5iv1h0zdc06my4dp07wvv9j76-KnobKraft-orm-2.7.1.drv' failed to build
´´´

The point that I don't understand is that every architecture, aarch64, x64_86, etc. all have different hashes. However, I just want to build it for x64_86_linux. So how do I tell ofborg to only build on one architecture and why does the hash that works locally not work with ofborg?

20:35:08
@backtail:matrix.orgbacktail *

Hey peeps, I unknowingly ran into the leaveDotGit bug of unpredictable hash generation for nix derivations. I patched the dependency, but now ofborg says that my provided hash is wrong:

error: hash mismatch in fixed-output derivation '/nix/store/q59g9bk2kwh20sr8ir00gz5d5yjkb75r-source.drv':
specified: sha256-HoqFBkxXlmbWaFPOVvO0zUhlDBVzz++T6Fgf0MAuyao=
got:    sha256-rcIbtIXTm1sNMCbs6W5DS/9KeMkWWhUdwReW++nW2Qc=
error: 1 dependencies of derivation '/nix/store/q5izjyv5iv1h0zdc06my4dp07wvv9j76-KnobKraft-orm-2.7.1.drv' failed to build

The point that I don't understand is that every architecture, aarch64, x64_86, etc. all have different hashes. However, I just want to build it for x64_86_linux. So how do I tell ofborg to only build on one architecture and why does the hash that works locally not work with ofborg?

20:37:20
@backtail:matrix.orgbacktailWell... now that I got another review, suddenly ofborg gives me output that it did successfully built the package for linux (aarch64 and x64_86) but failed for darwin. I am honestly confused as to how to interpret ofborg output. I would appreciate a quick explanation!21:16:19
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)More of a nixpkgs question generally: https://matrix.to/#/#users:nixos.org. But this might have to do with case sensitivity and whatnot23:44:15
28 Oct 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) Eelco: 00:29:23
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) * Eelco: as discussed during the meeeting, here's the constant-memory uploads to http binary caches: https://github.com/NixOS/nix/pull/14390 00:29:54
@backtail:matrix.orgbacktail
In reply to @xokdvium:matrix.org
More of a nixpkgs question generally: https://matrix.to/#/#users:nixos.org. But this might have to do with case sensitivity and whatnot
Thanks for the pointer!
01:39:08
@backtail:matrix.orgbacktail left the room.01:43:26

Show newer messages


Back to Room ListRoom Version: 6