FlafyDev/combined-manager

Nix Config isnt working

Closed this issue · 3 comments

Hello, First of all i dont know how to patch nix (or anything in general) so i tried by adding the nix setting to my configuration.nix
after the sudo rebuild switch i got this

error: builder for '/nix/store/cqf6x56yk18xh62985x5qjjhb6qq5kn1-nix-2.13.3.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/0fndr4vin57akqfjwnfvx01szjzialbm-nixos-rebuild.drv' failed to build
building Nix...
this derivation will be built:
  /nix/store/cqf6x56yk18xh62985x5qjjhb6qq5kn1-nix-2.13.3.drv
building '/nix/store/cqf6x56yk18xh62985x5qjjhb6qq5kn1-nix-2.13.3.drv'...
unpacking sources
unpacking source archive /nix/store/5598lqiaw5qjgn661w74q2a6kivgiksa-source
source root is source
patching sources
applying patch /nix/store/yd9wbklg3647cj2l9jy0f6rc3s2jwqqg-source/nix-patches/evaluable-flake.patch
patching file src/libexpr/flake/flake.cc
Hunk #2 FAILED at 222.
1 out of 2 hunks FAILED -- saving rejects to file src/libexpr/flake/flake.cc.rej
error: builder for '/nix/store/cqf6x56yk18xh62985x5qjjhb6qq5kn1-nix-2.13.3.drv' failed with exit code 1```

It seems you are using nix 2.13.3, but I've only tested the patch for 2.16.
try patching pkgs.nix_2_16 instead.

are you using the Nix super?
if then how exactly can i install/use it? adding it as an input? (i'm very new to this)

It seems you are using nix 2.13.3, but I've only tested the patch for 2.16. try patching pkgs.nix_2_16 instead.

i get that nix 2_16 does not exist so i should install it i guess?

and thanks you in advance.

This is how I currently do this.
I have an overlay to add nix-patched

      os.nixpkgs.overlays = [
        (_final: prev: {
          nix-patched = prev.nixVersions.nix_2_16.overrideAttrs (old: {
            patches =
              (old.patches or [])
              ++ (
                <path to patch file here>
              );
          });
        })
      ];

then I do

nix.package = pkgs.nix-patched;

I meant pkgs.nixVersions.nix_2_16, not pkgs.nix_2_16.

Sorry for the late response.