3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #2887 from bennofs/nix-prefetch-scripts

nix-prefetch-scripts: new expression
This commit is contained in:
Michael Raskin 2014-06-10 21:33:10 +04:00
commit a46c4d976c
3 changed files with 34 additions and 29 deletions

View file

@ -1,28 +0,0 @@
{stdenv}:
stdenv.mkDerivation {
name = "nix-prefetch-tools";
src = "";
srcRoot=".";
prePhases = "undefUnpack";
undefUnpack = ''
unpackPhase () { :; };
'';
installPhase = ''
mkdir -p $out/bin
cp ${../fetchbzr/nix-prefetch-bzr} $out/bin
cp ${../fetchcvs/nix-prefetch-cvs} $out/bin
cp ${../fetchgit/nix-prefetch-git} $out/bin
cp ${../fetchhg/nix-prefetch-hg} $out/bin
cp ${../fetchsvn/nix-prefetch-svn} $out/bin
chmod a+x $out/bin/*
'';
meta = {
description = ''
A package to include all the NixPkgs prefetchers
'';
maintainers = with stdenv.lib.maintainers; [raskin];
platforms = with stdenv.lib.platforms; unix;
# Quicker to build than to download, I hope
hydraPlatforms = [];
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, makeWrapper, git, subversion, mercurial, bazaar, cvs }:
stdenv.mkDerivation {
name = "nix-prefetch-scripts";
buildInputs = [ makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/bin
function copyScript {
local name=nix-prefetch-$1;
local src=$2;
local exe=$3/bin;
cp $src $out/bin/$name;
wrapProgram $out/bin/$name --suffix PATH : "$exe"
}
copyScript "hg" ${../../../build-support/fetchhg/nix-prefetch-hg} ${mercurial}
copyScript "git" ${../../../build-support/fetchgit/nix-prefetch-git} ${git}
copyScript "svn" ${../../../build-support/fetchsvn/nix-prefetch-svn} ${subversion}
copyScript "bzr" ${../../../build-support/fetchbzr/nix-prefetch-bzr} ${bazaar}
copyScript "cvs" ${../../../build-support/fetchcvs/nix-prefetch-cvs} ${cvs}
'';
meta = with stdenv.lib; {
description = "Collection of all the nix-prefetch-* scripts which may be used to obtain source hashes";
maintainers = with maintainers; [ bennofs ];
platforms = with stdenv.lib.platforms; unix;
# Quicker to build than to download, I hope
hydraPlatforms = [];
};
}

View file

@ -10894,7 +10894,7 @@ let
nixops = callPackage ../tools/package-management/nixops { };
nix-prefetch-tools = callPackage ../build-support/nix-prefetch-tools {};
nix-prefetch-scripts = callPackage ../tools/package-management/nix-prefetch-scripts { };
nix-repl = callPackage ../tools/package-management/nix-repl { };