diff options
author | Robin Gloster <mail@glob.in> | 2016-01-26 16:34:33 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-30 20:31:05 +0000 |
commit | 5e189bd207c78b5d3dd7161640bdca756dff04cb (patch) | |
tree | dbb6b8e4fb2c3a47fc04816987d2be1d865d551a /pkgs/tools/graphics/welkin | |
parent | ea9c2fad54805b35441fa7b8cafe7643bfa5031e (diff) | |
download | nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar.gz nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar.bz2 nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar.lz nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar.xz nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.tar.zst nixpkgs-5e189bd207c78b5d3dd7161640bdca756dff04cb.zip |
welkin: use mkDerivation and fix build
Diffstat (limited to 'pkgs/tools/graphics/welkin')
-rw-r--r-- | pkgs/tools/graphics/welkin/default.nix | 68 |
1 files changed, 23 insertions, 45 deletions
diff --git a/pkgs/tools/graphics/welkin/default.nix b/pkgs/tools/graphics/welkin/default.nix index 3d1a2aa5bdc..6e268ef5941 100644 --- a/pkgs/tools/graphics/welkin/default.nix +++ b/pkgs/tools/graphics/welkin/default.nix @@ -1,57 +1,35 @@ -x@{builderDefsPackage - , jre - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["jre"]; +{ stdenv, fetchsvn, jre, makeWrapper }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="welkin"; - version="1.1"; - name="${baseName}-${version}"; - url="http://simile.mit.edu/dist/welkin/${name}.tar.gz"; - hash="0hr2xvfz887fdf2ysiqydv6m13gbdl5x0fh4960i655d5imvd5x0"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; +stdenv.mkDerivation rec { + name = "welkin-${version}"; + version = "1.1"; - inherit (sourceInfo) name version; - inherit buildInputs; + src = fetchsvn { + url = "http://simile.mit.edu/repository/welkin"; + rev = "9638"; + sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp"; + }; - /* doConfigure should be removed if not needed */ - phaseNames = ["doDeploy" "createBin"]; + sourceRoot = "welkin-r9638/tags/${version}"; - doDeploy = a.simplyShare "welkin"; + buildInputs = [ jre makeWrapper ]; - createBin = a.fullDepEntry '' - mkdir -p "$out/bin" - echo "#! ${a.stdenv.shell}" > "$out/bin/welkin" - echo "export JAVA_HOME=${jre}" >> "$out/bin/welkin" - echo "\"$out/share/welkin/welkin.sh\" \"\$@\"" >> "$out/bin/welkin" - sed -e 's@[.]/lib/welkin[.]jar@"'"$out"'/share/welkin/lib/welkin.jar"@' -i "$out/share/welkin/welkin.sh" - chmod a+x "$out/bin/welkin" - '' ["minInit" "defEnsureDir"]; + installPhase = '' + mkdir -p $out/{bin,share} + cp -R . $out/share + cp $out/share/welkin.sh $out/bin/welkin + sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin + wrapProgram $out/bin/welkin \ + --set JAVA_HOME ${jre} + chmod a+x $out/bin/welkin + ''; meta = { description = "An RDF visualizer"; - maintainers = with a.lib.maintainers; - [ + maintainers = with stdenv.lib.maintainers; [ raskin ]; hydraPlatforms = []; - license = a.lib.licenses.free; - }; - passthru = { - updateInfo = { - downloadPage = "http://simile.mit.edu/dist/welkin/"; - }; + license = stdenv.lib.licenses.free; }; -}) x +} |