···11+{ lib
22+, stdenv
33+, fetchurl
44+, pkg-config
55+, libX11
66+, gtk2
77+, fig2dev
88+, wrapGAppsHook
99+}:
1010+1111+stdenv.mkDerivation rec {
1212+ pname = "chemtool";
1313+ version = "1.6.14";
1414+1515+ src = fetchurl {
1616+ url = "http://ruby.chemie.uni-freiburg.de/~martin/${pname}/${pname}-${version}.tar.gz";
1717+ sha256 = "hhYaBGE4azNKX/sXzfCUpJGUGIRngnL0V0mBNRTdr8s=";
1818+ };
1919+2020+ nativeBuildInputs = [ pkg-config wrapGAppsHook ];
2121+ buildInputs = [
2222+ libX11
2323+ gtk2
2424+ fig2dev
2525+ ];
2626+2727+ preFixup = ''
2828+ gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}")
2929+ '';
3030+3131+ meta = with lib; {
3232+ homepage = "http://ruby.chemie.uni-freiburg.de/~martin/chemtool/";
3333+ description = "Draw chemical structures";
3434+ longDescription = ''
3535+ Chemtool is a program for drawing organic molecules. It runs under the X
3636+ Window System using the GTK widget set.
3737+3838+ Most operations in chemtool can be accomplished using the mouse - the
3939+ first (usually the left) button is used to select or place things, the
4040+ middle button modifies properties (e.g. reverses the direction of a bond),
4141+ and the right button is used to delete objects.
4242+4343+ The program offers essentially unlimited undo/redo, two text fonts plus
4444+ symbols, seven colors, drawing at several zoom scales, and square and
4545+ hexagonal backdrop grids for easier alignment.
4646+ '';
4747+ license = licenses.mit;
4848+ maintainers = with maintainers; [ AndersonTorres ];
4949+ };
5050+}