nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, jre, makeWrapper, substituteAll, coreutils }:
2016-06-12 21:48:32 +01:00
stdenv.mkDerivation rec {
pname = "cytoscape";
2020-10-29 12:55:33 +00:00
version = "3.8.2";
2016-06-12 21:48:32 +01:00
src = fetchurl {
url = "https://github.com/cytoscape/cytoscape/releases/download/${version}/${pname}-unix-${version}.tar.gz";
2020-10-29 12:55:33 +00:00
sha256 = "0zgsq9qnyvmq96pgf7372r16rm034fd0r4qa72xi9zbd4f2r7z8w";
2016-06-12 21:48:32 +01:00
};
patches = [
# By default, gen_vmoptions.sh tries to store custom options in $out/share
# at run time. This patch makes sure $HOME is used instead.
(substituteAll {
src = ./gen_vmoptions_to_homedir.patch;
inherit coreutils;
})
];
2016-06-12 21:48:32 +01:00
buildInputs = [jre makeWrapper];
installPhase = ''
mkdir -pv $out/{share,bin}
cp -Rv * $out/share/
ln -s $out/share/cytoscape.sh $out/bin/cytoscape
wrapProgram $out/share/cytoscape.sh \
2016-06-12 21:48:32 +01:00
--set JAVA_HOME "${jre}" \
--set JAVA "${jre}/bin/java"
chmod +x $out/bin/cytoscape
'';
meta = {
homepage = "http://www.cytoscape.org";
2016-06-12 21:48:32 +01:00
description = "A general platform for complex network analysis and visualization";
license = stdenv.lib.licenses.lgpl21;
maintainers = [stdenv.lib.maintainers.mimame];
platforms = stdenv.lib.platforms.unix;
2016-06-12 21:48:32 +01:00
};
}