tests: avoid copying .git into the store

This commit is contained in:
nicoo 2024-09-17 09:39:51 +00:00
parent ea15a9fbb4
commit 493442c470

View File

@ -15,6 +15,19 @@ pkgs.runCommand "all-attrs-eval-under-tryEval" {
pkgs.gitMinimal pkgs.gitMinimal
] ++ lib.optional pkgs.stdenv.isLinux pkgs.inotify-tools; ] ++ lib.optional pkgs.stdenv.isLinux pkgs.inotify-tools;
strictDeps = true; strictDeps = true;
src = with lib.fileset; toSource {
root = pkgs-path;
fileset = unions [
./default.nix
./doc
./lib
./maintainers
./nixos
./pkgs
./.version
];
};
} }
'' ''
datadir="${nix}/share" datadir="${nix}/share"
@ -31,15 +44,8 @@ pkgs.runCommand "all-attrs-eval-under-tryEval" {
nix-store --init nix-store --init
cp -r ${pkgs-path}/lib lib
cp -r ${pkgs-path}/pkgs pkgs
cp -r ${pkgs-path}/default.nix default.nix
cp -r ${pkgs-path}/nixos nixos
cp -r ${pkgs-path}/maintainers maintainers
cp -r ${pkgs-path}/.version .version
cp -r ${pkgs-path}/doc doc
echo "Running pkgs/top-level/release-attrpaths-superset.nix" echo "Running pkgs/top-level/release-attrpaths-superset.nix"
nix-instantiate --eval --strict --json pkgs/top-level/release-attrpaths-superset.nix -A names > /dev/null nix-instantiate --eval --strict --json $src/pkgs/top-level/release-attrpaths-superset.nix -A names > /dev/null
mkdir $out mkdir $out
echo success > $out/${nix.version} echo success > $out/${nix.version}