mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
fetchgitlocal: local fetcher based on git ls-files
This commit is contained in:
parent
3adef78df6
commit
da73e45cd0
2 changed files with 14 additions and 0 deletions
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