···1+{ lib
2+, stdenv
3+, fetchurl
4+, pkg-config
5+, libX11
6+, gtk2
7+, fig2dev
8+, wrapGAppsHook
9+}:
10+11+stdenv.mkDerivation rec {
12+ pname = "chemtool";
13+ version = "1.6.14";
14+15+ src = fetchurl {
16+ url = "http://ruby.chemie.uni-freiburg.de/~martin/${pname}/${pname}-${version}.tar.gz";
17+ sha256 = "hhYaBGE4azNKX/sXzfCUpJGUGIRngnL0V0mBNRTdr8s=";
18+ };
19+20+ nativeBuildInputs = [ pkg-config wrapGAppsHook ];
21+ buildInputs = [
22+ libX11
23+ gtk2
24+ fig2dev
25+ ];
26+27+ preFixup = ''
28+ gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}")
29+ '';
30+31+ meta = with lib; {
32+ homepage = "http://ruby.chemie.uni-freiburg.de/~martin/chemtool/";
33+ description = "Draw chemical structures";
34+ longDescription = ''
35+ Chemtool is a program for drawing organic molecules. It runs under the X
36+ Window System using the GTK widget set.
37+38+ Most operations in chemtool can be accomplished using the mouse - the
39+ first (usually the left) button is used to select or place things, the
40+ middle button modifies properties (e.g. reverses the direction of a bond),
41+ and the right button is used to delete objects.
42+43+ The program offers essentially unlimited undo/redo, two text fonts plus
44+ symbols, seven colors, drawing at several zoom scales, and square and
45+ hexagonal backdrop grids for easier alignment.
46+ '';
47+ license = licenses.mit;
48+ maintainers = with maintainers; [ AndersonTorres ];
49+ };
50+}