diff --git a/flake.nix b/flake.nix index d8875d3575f..15867192671 100644 --- a/flake.nix +++ b/flake.nix @@ -139,6 +139,12 @@ nix = final.nixComponents.nix; + nix-serve = + prev.nix-serve.override { + # undo potential version pinning + nix = final.nix; + }; + # See https://github.com/NixOS/nixpkgs/pull/214409 # Remove when fixed in this flake's nixpkgs pre-commit = diff --git a/package.nix b/package.nix index 8ab1846679c..7c2a94eab41 100644 --- a/package.nix +++ b/package.nix @@ -27,6 +27,7 @@ , mdbook , mdbook-linkcheck , mercurial +, nix-perl-bindings , openssh , openssl , pkg-config @@ -334,6 +335,10 @@ in { hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; + passthru = lib.optionalAttrs (stdenv.buildPlatform.canExecute stdenv.hostPlatform) { + perl-bindings = nix-perl-bindings; + }; + meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; mainProgram = "nix"; diff --git a/packaging/everything.nix b/packaging/everything.nix index 6dae7f1c208..f34df9689cd 100644 --- a/packaging/everything.nix +++ b/packaging/everything.nix @@ -122,5 +122,8 @@ nix-main-c ; }; + } + // lib.optionalAttrs (stdenv.buildPlatform.canExecute stdenv.hostPlatform) { + perl-bindings = nix-perl-bindings; }; }) diff --git a/tests/nixos/default.nix b/tests/nixos/default.nix index 62fc6b10f91..fc59bd2b65b 100644 --- a/tests/nixos/default.nix +++ b/tests/nixos/default.nix @@ -160,3 +160,10 @@ in cgroups = runNixOSTestFor "x86_64-linux" ./cgroups; } +// (let + inherit (nixpkgsFor."x86_64-linux".native) nixosTests; +in { + nix-serve = + assert nixosTests.nix-serve.config.nodes.machine.services.nix-serve.package.nix == self.packages.x86_64-linux.nix; + nixosTests.nix-serve; +})