forked from mirrors/nixpkgs
fetchgitlocal: local fetcher based on git ls-files
This commit is contained in:
parent
3adef78df6
commit
da73e45cd0
10
pkgs/build-support/fetchgitlocal/default.nix
Normal file
10
pkgs/build-support/fetchgitlocal/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ runCommand, git }: src:
|
||||
|
||||
runCommand "local-git-export" {} ''
|
||||
cd ${src}
|
||||
mkdir -p "$out"
|
||||
for file in $(${git}/bin/git ls-files); do
|
||||
mkdir -p "$out/$(dirname $file)"
|
||||
cp -d $file "$out/$file"
|
||||
done
|
||||
''
|
|
@ -329,6 +329,10 @@ let
|
|||
|
||||
fetchgitrevision = import ../build-support/fetchgitrevision runCommand git;
|
||||
|
||||
fetchgitLocal = import ../build-support/fetchgitlocal {
|
||||
inherit runCommand git;
|
||||
};
|
||||
|
||||
fetchmtn = callPackage ../build-support/fetchmtn (config.fetchmtn or {});
|
||||
|
||||
packer = callPackage ../development/tools/packer { };
|
||||
|
|
Loading…
Reference in a new issue