haskell.nix/overlays/nix-prefetch-git-minimal.nix
Hamish Mackenzie 64efc98852
Support githash package and cross package refs (#843)
* Adds support for cross package refs (with a project).  Relative
  directory references between packages within a project should now
  work.
* Adds `includeSiblings` to `cleanSourceWith`.  When `true` it
  prevents the `subDir` arg from causing filtering of other directories.
* Adds `keepGitDir` to `cleanGit` to allow `.git` directory to be kept
  (useful for components that use the `githash` package).
2021-01-14 12:34:06 +13:00

32 lines
942 B
Nix

final: prev: {
# gitMinimal still ships with perl (breaks for windows cross compilation)
gitReallyMinimal = (
final.git.override {
perlSupport = false;
pythonSupport = false;
withManual = false;
withpcre2 = false;
}
).overrideAttrs (
_: {
# installCheck is broken when perl is disabled
doInstallCheck = false;
}
);
# This can reduce closure size of nix-tools:
# * Eliminates dependency on python3 (70MB)
# * Allows sharing with `fetchgit` as it also uses `gitMinimal` (50MB)
inherit (final.callPackages (final.path + "/pkgs/tools/package-management/nix-prefetch-scripts") {
git = final.gitMinimal;
}) nix-prefetch-git;
# Find uses of the non minimal git package by uncommenting this:
# git = prev.intentional-error-here;
# gitMinimal = final.gitAndTools.git.override {
# withManual = false;
# pythonSupport = false;
# withpcre2 = false;
# };
}