1 { lib, stdenv, makeWrapper, buildEnv
2 , breezy, coreutils, cvs, findutils, gawk, git, git-lfs, gnused, mercurial, nix, subversion
5 let mkPrefetchScript = tool: src: deps:
7 name = "nix-prefetch-${tool}";
9 nativeBuildInputs = [ makeWrapper ];
14 install -vD ${src} $out/bin/$name;
15 wrapProgram $out/bin/$name \
16 --prefix PATH : ${lib.makeBinPath (deps ++ [ gnused nix ])} \
17 --set HOME /homeless-shelter
20 preferLocalBuild = true;
23 description = "Script used to obtain source hashes for fetch${tool}";
24 maintainers = with maintainers; [ bennofs ];
25 platforms = platforms.unix;
29 nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ breezy ];
30 nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [ cvs ];
31 nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ coreutils findutils gawk git git-lfs ];
32 nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [ mercurial ];
33 nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [ subversion ];
35 nix-prefetch-scripts = buildEnv {
36 name = "nix-prefetch-scripts";
38 paths = [ nix-prefetch-bzr nix-prefetch-cvs nix-prefetch-git nix-prefetch-hg nix-prefetch-svn ];
41 description = "Collection of all the nix-prefetch-* scripts which may be used to obtain source hashes";
42 maintainers = with maintainers; [ bennofs ];
43 platforms = platforms.unix;