welkin: use mkDerivation and fix build
This commit is contained in:
parent
ea9c2fad54
commit
5e189bd207
|
@ -1,57 +1,35 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchsvn, jre, makeWrapper }:
|
||||||
, jre
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
["jre"];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "welkin-${version}";
|
||||||
sourceInfo = rec {
|
version = "1.1";
|
||||||
baseName="welkin";
|
|
||||||
version="1.1";
|
src = fetchsvn {
|
||||||
name="${baseName}-${version}";
|
url = "http://simile.mit.edu/repository/welkin";
|
||||||
url="http://simile.mit.edu/dist/welkin/${name}.tar.gz";
|
rev = "9638";
|
||||||
hash="0hr2xvfz887fdf2ysiqydv6m13gbdl5x0fh4960i655d5imvd5x0";
|
sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp";
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
sourceRoot = "welkin-r9638/tags/${version}";
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
/* doConfigure should be removed if not needed */
|
buildInputs = [ jre makeWrapper ];
|
||||||
phaseNames = ["doDeploy" "createBin"];
|
|
||||||
|
|
||||||
doDeploy = a.simplyShare "welkin";
|
installPhase = ''
|
||||||
|
mkdir -p $out/{bin,share}
|
||||||
createBin = a.fullDepEntry ''
|
cp -R . $out/share
|
||||||
mkdir -p "$out/bin"
|
cp $out/share/welkin.sh $out/bin/welkin
|
||||||
echo "#! ${a.stdenv.shell}" > "$out/bin/welkin"
|
sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin
|
||||||
echo "export JAVA_HOME=${jre}" >> "$out/bin/welkin"
|
wrapProgram $out/bin/welkin \
|
||||||
echo "\"$out/share/welkin/welkin.sh\" \"\$@\"" >> "$out/bin/welkin"
|
--set JAVA_HOME ${jre}
|
||||||
sed -e 's@[.]/lib/welkin[.]jar@"'"$out"'/share/welkin/lib/welkin.jar"@' -i "$out/share/welkin/welkin.sh"
|
chmod a+x $out/bin/welkin
|
||||||
chmod a+x "$out/bin/welkin"
|
'';
|
||||||
'' ["minInit" "defEnsureDir"];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "An RDF visualizer";
|
description = "An RDF visualizer";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = with stdenv.lib.maintainers; [
|
||||||
[
|
|
||||||
raskin
|
raskin
|
||||||
];
|
];
|
||||||
hydraPlatforms = [];
|
hydraPlatforms = [];
|
||||||
license = a.lib.licenses.free;
|
license = stdenv.lib.licenses.free;
|
||||||
};
|
};
|
||||||
passthru = {
|
}
|
||||||
updateInfo = {
|
|
||||||
downloadPage = "http://simile.mit.edu/dist/welkin/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) x
|
|
||||||
|
|
Loading…
Reference in New Issue