1 { lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, jre }:
5 stdenv.mkDerivation rec {
10 name = "marvin-${version}.deb";
11 url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
12 hash = "sha256-5ycOteXcdgZaeDl3WQ95H2lD0OnnobCbmnVlfYwVdeI=";
15 nativeBuildInputs = [ dpkg makeWrapper ];
23 makeWrapper $1 $out/bin/$(basename $1) \
24 --set INSTALL4J_JAVA_HOME "${jre}" \
25 --prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
28 mkdir -p $out/bin $out/share/pixmaps $out/share/applications
29 for name in LicenseManager MarvinSketch MarvinView; do
30 wrapBin $out/opt/chemaxon/marvinsuite/$name
31 ln -s {$out/opt/chemaxon/marvinsuite/.install4j,$out/share/pixmaps}/$name.png
33 for name in cxcalc cxtrain evaluate molconvert mview msketch; do
34 wrapBin $out/opt/chemaxon/marvinsuite/bin/$name
36 ${concatStrings (map (name: ''
37 substitute ${./. + "/${name}.desktop"} $out/share/applications/${name}.desktop --subst-var out
38 '') [ "LicenseManager" "MarvinSketch" "MarvinView" ])}
42 description = "A chemical modelling, analysis and structure drawing program";
43 homepage = "https://chemaxon.com/products/marvin";
44 maintainers = with maintainers; [ fusion809 ];
45 license = licenses.unfree;
46 platforms = platforms.linux;