test/release: do not add .git to the store (#342498)

This commit is contained in:
K900 2024-09-17 13:16:39 +03:00 committed by GitHub
commit 21a0b12028
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,19 @@ pkgs.runCommand "all-attrs-eval-under-tryEval" {
pkgs.gitMinimal
] ++ lib.optional pkgs.stdenv.isLinux pkgs.inotify-tools;
strictDeps = true;
src = with lib.fileset; toSource {
root = pkgs-path;
fileset = unions [
../../../default.nix
../../../doc
../../../lib
../../../maintainers
../../../nixos
../../../pkgs
../../../.version
];
};
}
''
datadir="${nix}/share"
@ -31,15 +44,8 @@ pkgs.runCommand "all-attrs-eval-under-tryEval" {
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"
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
echo success > $out/${nix.version}