re-use global pins

This commit is contained in:
Valentin Gagarin 2025-02-12 23:50:37 +01:00
parent 84871c6ef9
commit 3bbd6acf4f
3 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ sources ? import ./npins { sources ? import ../npins
, system ? builtins.currentSystem , system ? builtins.currentSystem
, pkgs ? import sources.nixpkgs { , pkgs ? import sources.nixpkgs {
inherit system; inherit system;
@ -65,12 +65,12 @@ rec {
tests = with pkgs; with lib; tests = with pkgs; with lib;
let let
source = fileset.toSource { source = fileset.toSource {
root = ./.; root = ../.;
fileset = fileset.unions [ fileset = fileset.unions [
./default.nix ./default.nix
./tests.nix ./tests.nix
./lib.nix ./lib.nix
./npins ../npins
]; ];
}; };
in in
@ -86,7 +86,7 @@ rec {
# adding it verbatim will result in <hash'>-<hash>-source, so rename it first # adding it verbatim will result in <hash'>-<hash>-source, so rename it first
cp -r ${sources.nixpkgs} source cp -r ${sources.nixpkgs} source
nix-store --add --store "$HOME" source nix-store --add --store "$HOME" source
${getExe nix-unit} --gc-roots-dir "$HOME" --store "$HOME" ${source}/tests.nix "$@" ${getExe nix-unit} --gc-roots-dir "$HOME" --store "$HOME" ${source}/website/tests.nix "$@"
touch $out touch $out
''; '';
} }