about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrenton Horne <brentonhorne77@gmail.com>2019-01-15 00:23:38 +1000
committerBrenton Horne <brentonhorne77@gmail.com>2019-01-15 00:23:38 +1000
commit6be5e679b188d6e8301992a13a38fea2cd3a67cc (patch)
tree119b56fc03452523a54712945caef25f40b5c4a3
parent6359e9baf01a7bdc37f18a6eda7b6953e95318f0 (diff)
downloadnixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar.gz
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar.bz2
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar.lz
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar.xz
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.tar.zst
nixlib-6be5e679b188d6e8301992a13a38fea2cd3a67cc.zip
marvin: init at 19.1.0
Also adding myself (fusion809) as a maintainer.
The marvin Nix file in this commit is largely thanks to @msteen.
-rw-r--r--maintainers/maintainer-list.nix5
-rwxr-xr-xpkgs/applications/science/chemistry/marvin/LicenseManager.desktop9
-rwxr-xr-xpkgs/applications/science/chemistry/marvin/MarvinSketch.desktop10
-rwxr-xr-xpkgs/applications/science/chemistry/marvin/MarvinView.desktop10
-rw-r--r--pkgs/applications/science/chemistry/marvin/default.nix49
-rw-r--r--pkgs/top-level/all-packages.nix2
6 files changed, 85 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index c1b2345b1d74..243da34600d9 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -1586,6 +1586,11 @@
     email = "eocallaghan@alterapraxis.com";
     name = "Edward O'Callaghan";
   };
+  fusion809 = {
+    email = "brentonhorne77@gmail.com";
+    github = "fusion809";
+    name = "Brenton Horne";
+  };
   fuuzetsu = {
     email = "fuuzetsu@fuuzetsu.co.uk";
     github = "fuuzetsu";
diff --git a/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop b/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
new file mode 100755
index 000000000000..90b8ed7d20a5
--- /dev/null
+++ b/pkgs/applications/science/chemistry/marvin/LicenseManager.desktop
@@ -0,0 +1,9 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=ChemAxon License Manager
+Exec=@out@/bin/LicenseManager
+Icon=LicenseManager
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
+Comment=License manager for ChemAxon software like MarvinSketch
diff --git a/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop b/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
new file mode 100755
index 000000000000..d6e0343a78c3
--- /dev/null
+++ b/pkgs/applications/science/chemistry/marvin/MarvinSketch.desktop
@@ -0,0 +1,10 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=MarvinSketch
+Exec=@out@/bin/msketch %f
+Icon=MarvinSketch
+MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
+Comment=Molecular modelling, analysis and structure drawing program
diff --git a/pkgs/applications/science/chemistry/marvin/MarvinView.desktop b/pkgs/applications/science/chemistry/marvin/MarvinView.desktop
new file mode 100755
index 000000000000..07a3c3c7cf33
--- /dev/null
+++ b/pkgs/applications/science/chemistry/marvin/MarvinView.desktop
@@ -0,0 +1,10 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Type=Application
+Name=MarvinView
+Exec=@out@/bin/mview %f
+Icon=MarvinView
+Comment=Molecule viewing program
+MimeType=text/xml;text/plain;chemical/x-cml;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-mol2;chemical/x-pdb;chemical/x-xyz;chemical/x-mdl-rdfile;chemical/x-mdl-rxnfile;chemical/x-inchi;
+Categories=Education;Science;Chemistry;
+StartupWMClass=com-install4j-runtime-launcher-UnixLauncher
diff --git a/pkgs/applications/science/chemistry/marvin/default.nix b/pkgs/applications/science/chemistry/marvin/default.nix
new file mode 100644
index 000000000000..948aed03fe5e
--- /dev/null
+++ b/pkgs/applications/science/chemistry/marvin/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, jre }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "marvin";
+  version = "19.1.0";
+
+  src = fetchurl {
+    name = "marvin-${version}.deb";
+    url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
+    sha256 = "1ccsimfvms5q4prjyk6sg5hsc3hkcjjfq3gl7jjm8dgd2173zzyc";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  unpackPhase = ''
+    dpkg-deb -x $src opt
+  '';
+
+  installPhase = ''
+    wrapBin() {
+      makeWrapper $1 $out/bin/$(basename $1) \
+        --set INSTALL4J_JAVA_HOME "${jre}" \
+        --prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
+    }
+    cp -r opt $out
+    mkdir -p $out/bin $out/share/pixmaps $out/share/applications
+    for name in LicenseManager MarvinSketch MarvinView; do
+      wrapBin $out/opt/chemaxon/marvinsuite/$name
+      ln -s {$out/opt/chemaxon/marvinsuite/.install4j,$out/share/pixmaps}/$name.png
+    done
+    for name in cxcalc cxtrain evaluate molconvert mview msketch; do
+      wrapBin $out/opt/chemaxon/marvinsuite/bin/$name
+    done
+    ${concatStrings (map (name: ''
+      substitute ${./. + "/${name}.desktop"} $out/share/applications/${name}.desktop --subst-var out
+    '') [ "LicenseManager" "MarvinSketch" "MarvinView" ])}
+  '';
+
+  meta = {
+    description = "A chemical modelling, analysis and structure drawing program";
+    homepage = https://chemaxon.com/products/marvin;
+    maintainers = with maintainers; [ fusion809 ];
+    license = licenses.unfree;
+    platforms = platforms.linux;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 260dedab4b26..7d110269edb0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -21395,6 +21395,8 @@ in
 
   jmol = callPackage ../applications/science/chemistry/jmol { };
 
+  marvin = callPackage ../applications/science/chemistry/marvin { };
+
   molden = callPackage ../applications/science/chemistry/molden { };
 
   octopus = callPackage ../applications/science/chemistry/octopus { openblas=openblasCompat; };