commit 37f518a79a635d4925526eef0ecdf95f770f752a Author: Sergiu Ivanov Date: Thu Jul 9 12:04:40 2020 +0200 Take in the two Nix files. diff --git a/ginsim.nix b/ginsim.nix new file mode 100644 index 0000000..eb26816 --- /dev/null +++ b/ginsim.nix @@ -0,0 +1,45 @@ +# 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 {}; +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; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..d2dc1e4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +with import {}; +let + ginsim = callPackage ./ginsim.nix {}; +in +stdenv.mkDerivation { + name = "GINsim-shell"; + buildInputs = [ ginsim ]; +}