Created
January 12, 2019 13:32
-
-
Save fusion809/b14155b957323ba6c2f6d30a41beefd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, fetchurl, dpkg, jre, makeWrapper }: | |
stdenv.mkDerivation { | |
pname = "marvin"; | |
version = "19.1.0"; | |
src = | |
fetchurl { | |
name = "marvin-${version}.deb"; | |
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_19.1.deb"; | |
sha256 = "1ccsimfvms5q4prjyk6sg5hsc3hkcjjfq3gl7jjm8dgd2173zzyc"; | |
}; | |
buildInputs = [ dpkg makeWrapper ]; | |
unpackPhase = '' | |
dpkg-deb -x $src . | |
''; | |
installPhase = '' | |
cp -r * $out | |
mkdir -p $out/share/applications $out/share/pixmaps $out/bin | |
makeWrapper ${jre}/bin/java $out/bin/msketch \ | |
--add-flags "-jar $out/share/astah/astah-community.jar" | |
substitute ${./MarvinSketch.desktop} $out/share/applications/MarvinSketch.desktop --subst-var out | |
substitute ${./MarvinView.desktop} $out/share/applications/MarvinView.desktop --subst-var out | |
cp $out/opt/chemaxon/marvinsuite/.install4j/Marvin*.png $out/share/pixmaps | |
sed -i -e "s|@out|$out|g" $out/share/applications/*.desktop | |
''; | |
meta = with lib; { | |
description = "A chemical modelling and structure drawing program"; | |
homepage = https://chemaxon.com/products/marvin; | |
maintainers = with maintainers; [ fusion809 ]; | |
license = licenses.unfree; | |
platforms = platforms.linux; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment