!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

858 Members
For people hacking on the Nix package manager itself186 Servers

Load older messages


SenderMessageTime
8 Sep 2025
@oddlama:matrix.orgoddlama joined the room.13:36:49
@oddlama:matrix.orgoddlama

I'm having trouble overriding stdenv for the nix package:

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";

  outputs =
    inputs:
    let
      pkgs = import inputs.nixpkgs {
        system = "x86_64-linux";
      };
    in
    {
      packages.x86_64-linux = {
        nix_2_30_clang = pkgs.nixVersions.nix_2_30.override {
          stdenv = pkgs.clangStdenv;
        };
      };
    };
}

Building this package does not actually trigger a build but reuses the gcc artifacts while rebuilding some kind of wrapper (?)

$ nix build .#packages.x86_64-linux.nix_2_30_clang
$ readelf -p .comment ./result/bin/nix
String dump of section '.comment':
  [     1]  GCC: (GNU) 14.3.0

This should probably say something like:

  [     0]  GCC: (GNU) 14.3.0
  [    12]  clang version 18.1.8

Overriding still works for the autoconf based build (nix_2_24) but not for any of the newer package builds. It seems like the override is silently ignored and not passed down to the sub-derivations anymore.

13:50:11
@sandro:supersandro.deSandro 🐧

Did you try?

nixVersions = prev.nixVersions.extend (final: prev: 
  nixComponents_2_31 = prev.nixComponents_2_31.overrideScope (finalScope: prevScope: { stdenv = pkgs_25_05.clangStdenv; };
};
14:37:21
@oddlama:matrix.orgoddlamaYes that is looking good, thanks. Is this the preferred way to do overrides for those types of packages now?15:35:33
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @oddlama:matrix.org
Yes that is looking good, thanks. Is this the preferred way to do overrides for those types of packages now?
For the modular packaging - yes. Since now this is not a monolithic package that you can override
16:04:22
@sandro:supersandro.deSandro 🐧

Also an example on how to add patches

    nixComponents_2_31 = (prev.nixComponents_2_31.overrideScope (finalScope: prevScope: {
      aws-sdk-cpp = null;
      boost = boost231;
      withAWS = false;
    })).appendPatches (commonPatches ++ [
      ./nix-derivation-better-copy-2.30.diff
    ]);
16:05:49
9 Sep 2025
@winter:catgirl.cloudWinter this is seemingly missing where commonPatches comes from fyi 02:21:31
@sandro:supersandro.deSandro 🐧 *

Also an example on how to add patches

    nixComponents_2_31 = (prev.nixComponents_2_31.overrideScope (finalScope: prevScope: {
      aws-sdk-cpp = null;
      boost = boost231;
      withAWS = false;
    })).appendPatches [
      ./nix-derivation-better-copy-2.30.diff
    ];
08:50:38
@sandro:supersandro.deSandro 🐧That's just a list I have somewhere above in a let in08:50:56
@aciceri:nixos.devaciceri changed their display name from zrsk to aciceri.15:02:57
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Curiously, Boehm granule size on 64 bit systems is 16 bytes. That means that 16 byte atomics for Value are very workable, since x86_64 needs stuff to be 16 bytes aligned (otherwise memory might straddle the cache line and that won’t be atomic ever)17:31:17
10 Sep 2025
@ss:someonex.netSomeoneSerge (back on matrix) changed their display name from SomeoneSerge (@nixcon & back on matrix) to SomeoneSerge (back on matrix).00:34:03
@nerves:bark.lgbt@nerves:bark.lgbt left the room.12:31:49
@akanygen:matrix.orgHierophilos joined the room.14:18:45
@matthewcroughan:defenestrate.itmatthewcroughan changed their display name from matthewcroughan @ nixcon to matthewcroughan.14:56:12
@connorbaker:matrix.orgconnor (he/him) (UTC-7) changed their display name from connor (he/him) (UTC+2) to connor (he/him) (UTC-7).22:20:37
11 Sep 2025
@prestonh:matrix.orgPreston joined the room.17:06:14
12 Sep 2025
@getchoo:matrix.orggetchoo joined the room.00:07:47
@getchoo:matrix.orggetchoo hey Mic92: just came across your comment on the detnix installer thread. i'm not super familiar with the codebase just yet, but i have a good bit of experience with gha and ci janitor work, and would love to help out if i can! :) 00:16:11
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Here are some notes from our meeting with the installer team. I forgor to publish them to discourse https://pad.lassul.us/KgpbqiQpQEOX2cKF5Ehjwg#00:24:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Very incomplete and half-way00:24:49
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)But basically it'd be great to start integrating it into our dogfooding setup https://github.com/NixOS/nix/blob/master/.github/actions/install-nix-action/action.yaml00:25:28
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)PoC for 16 byte atomics on x86_64 for paralell eval: https://github.com/NixOS/nix/pull/13964. Lovers of compiler intrinsics are welcome01:07:35
@jordanjoel1:matrix.org@jordanjoel1:matrix.org changed their profile picture.03:27:09
@jordanjoel1:matrix.org@jordanjoel1:matrix.org left the room.03:34:24
@thefossguy:matrix.orgPratham Patel joined the room.04:41:40
@getchoo:matrix.orggetchoo thanks for the link! i'll take a closer look at some of the stuff mentioned and what's already there this weekend hopefully (new job has had me a bit busy, catching covid from it didn't help either πŸ˜†), but i definitely think i can get this dogfooding setup going. i already have a bit of experience with very similar things in other action projects 05:01:36
@jaen:matrix.orgjaen If there are other tasks that can be done in parallel for installer upstreaming I'd also be interested β€” I was cooking a Nix article series for $CURRENT_JOB blog (the company does a lot of Bazel, so it's structured by way of compare & contrast) and don't feel comfortable publishing them until after the installer situation is resolved, I don't really want to redirect people away from the upstream. 11:27:06
@magic_rb:matrix.redalder.orgmagic_rbAs many before me, i implemented my own very basic nix evaluator, it doesnt have any builtins right now, only does basic arithmetic. But the point of it is that it doesnt use AST walking, but rather an approach similar to the STG. Its not fully tagless unfortunately, but i think im just missing something. Anyway, it only makes sense to develop it further if its faster than nix/lix so im wondering if its possible to formulate micro benchmarks relying on a subset of the nix language which could tell me whether my impl is faster or not. Anyone has thought about this before?15:07:03
@magic_rb:matrix.redalder.orgmagic_rb I dont want to write a full nix impl only to figure out "its horribly slow and nothing can be done about that". Ideally we'd be able to tell way before i implement all the nixisms 15:08:27

Show newer messages


Back to Room ListRoom Version: 6