Build support

This commit is contained in:
Tim Steinbach
2016-10-30 11:41:20 -04:00
parent 870fc84412
commit d849c0e2e1
4 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
{ stdenv, fetchurl }:
{ version, baseName, package, sha512, type ? "jar" }:
let
name = "${baseName}-${version}";
m2Path = "${package}/${baseName}/${version}";
m2File = "${name}.${type}";
src = fetchurl rec {
inherit sha512;
url = "mirror://maven/${m2Path}/${m2File}";
};
in stdenv.mkDerivation rec {
inherit name m2Path m2File src;
installPhase = ''
mkdir -p $out/m2/$m2Path
cp $src $out/m2/$m2Path/$m2File
'';
phases = "installPhase";
}