fetchgitlocal: local fetcher based on git ls-files
This commit is contained in:
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
|
||||
''
|
||||
Reference in New Issue
Block a user