on iko/ghcjs-patch-master help sign in
Exclude .source-repository-packages from plan nix (#379)
commit91e234167220fee4d3a0d5047abfd2a5b31391a5 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateSat 21 Dec 2019, 17:30 (7 years ago) parent0e66dbd
1 file changed+7−1
lib/call-cabal-project-to-nix.nix+7−1
lib/call-cabal-project-to-nix.nix+7−1
@@ -231,7 +231,13 @@ let
231231 # Remove the non nix files ".project" ".cabal" "package.yaml" files
232232 # as they should not be in the output hash (they may change slightly
233233 # without affecting the nix).
234− find $out -type f ! -name '*.nix' -exec rm "{}" \;
234+ if [ -d $out/.source-repository-packages ]; then
235+ chmod +w -R $out/.source-repository-packages
236+ rm -rf $out/.source-repository-packages
237+ fi
238+ find $out -type f ! -name '*.nix' -delete
239+ # Remove empty dirs
240+ find $out -type d -empty -delete
235241
236242 # move pkgs.nix to default.nix ensure we can just nix `import` the result.
237243 mv $out/pkgs.nix $out/default.nix