nix-GINsim/ginsim.nix

46 lines
1.2 KiB
Nix

# ginsim.nix
#
# Packages GINsim.
#
# You can build this file with the following command:
#
# nix-build ginsim.nix
#
# Or you can use in a nix-shell as shell.nix in the same directory
# illustrates.
let
pkgs = import <nixpkgs> {};
in
{ stdenv ? pkgs.stdenv, fetchurl ? pkgs.fetchurl, makeWrapper ? pkgs.makeWrapper, jre ? pkgs.jre }:
stdenv.mkDerivation rec {
name = "GINsim";
version = "2.4";
src = fetchurl {
url = "http://ginsim.org/sites/default/files/${name}-${version}.jar";
sha256 = "0891q75hli6ghgangscygkqw60x9ikx96i8y4fqca6kdh1xgs15h";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -pv $out/share/java $out/bin
cp ${src} $out/share/java/${name}-${version}.jar
makeWrapper ${jre}/bin/java $out/bin/GINsim \
--add-flags "-jar $out/share/java/${name}-${version}.jar" \
--set _JAVA_OPTIONS '-Dawt.useSystemAAFontSettings=on' \
--set _JAVA_AWT_WM_NONREPARENTING 1
'';
meta = {
homepage = "http://ginsim.org/";
description = "A computer tool for the modeling and simulation of genetic regulatory networks.";
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.unix;
};
}