nixpkgs/pkgs/tools/package-management/nix-prefetch-scripts/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.7 KiB
Nix
Raw Normal View History

2021-03-04 01:09:36 +00:00
{ lib, stdenv, makeWrapper, buildEnv
, breezy, coreutils, cvs, findutils, gawk, git, git-lfs, gnused, mercurial, nix, subversion
}:
2014-06-10 15:36:41 +00:00
let mkPrefetchScript = tool: src: deps:
stdenv.mkDerivation {
name = "nix-prefetch-${tool}";
nativeBuildInputs = [ makeWrapper ];
2019-06-19 15:45:34 +00:00
dontUnpack = true;
installPhase = ''
install -vD ${src} $out/bin/$name;
wrapProgram $out/bin/$name \
2021-01-15 09:19:50 +00:00
--prefix PATH : ${lib.makeBinPath (deps ++ [ gnused nix ])} \
--set HOME /homeless-shelter
'';
preferLocalBuild = true;
meta = with lib; {
description = "Script used to obtain source hashes for fetch${tool}";
maintainers = with maintainers; [ bennofs ];
2021-03-04 01:09:36 +00:00
platforms = platforms.unix;
};
};
in rec {
2020-04-19 08:48:42 +00:00
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ breezy ];
nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [ cvs ];
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ coreutils findutils gawk git git-lfs ];
nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [ mercurial ];
nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [ subversion ];
nix-prefetch-scripts = buildEnv {
name = "nix-prefetch-scripts";
paths = [ nix-prefetch-bzr nix-prefetch-cvs nix-prefetch-git nix-prefetch-hg nix-prefetch-svn ];
meta = with lib; {
description = "Collection of all the nix-prefetch-* scripts which may be used to obtain source hashes";
maintainers = with maintainers; [ bennofs ];
2021-03-04 01:09:36 +00:00
platforms = platforms.unix;
};
2014-06-10 15:36:41 +00:00
};
2014-06-21 03:05:48 +00:00
}