nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 libX11,
7 gtk2,
8 fig2dev,
9 wrapGAppsHook3,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "chemtool";
14 version = "1.6.14";
15
16 src = fetchurl {
17 url = "http://ruby.chemie.uni-freiburg.de/~martin/${pname}/${pname}-${version}.tar.gz";
18 sha256 = "hhYaBGE4azNKX/sXzfCUpJGUGIRngnL0V0mBNRTdr8s=";
19 };
20
21 nativeBuildInputs = [
22 pkg-config
23 wrapGAppsHook3
24 ];
25 buildInputs = [
26 libX11
27 gtk2
28 fig2dev
29 ];
30
31 # Workaround build on -fno-common toolchains like upstream gcc-10.
32 # Otherwise built fails as:
33 # ld: inout.o:/build/chemtool-1.6.14/ct1.h:279: multiple definition of
34 # `outtype'; draw.o:/build/chemtool-1.6.14/ct1.h:279: first defined here
35 env.NIX_CFLAGS_COMPILE = "-fcommon";
36
37 preFixup = ''
38 gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}")
39 '';
40
41 meta = {
42 homepage = "http://ruby.chemie.uni-freiburg.de/~martin/chemtool/";
43 description = "Draw chemical structures";
44 longDescription = ''
45 Chemtool is a program for drawing organic molecules. It runs under the X
46 Window System using the GTK widget set.
47
48 Most operations in chemtool can be accomplished using the mouse - the
49 first (usually the left) button is used to select or place things, the
50 middle button modifies properties (e.g. reverses the direction of a bond),
51 and the right button is used to delete objects.
52
53 The program offers essentially unlimited undo/redo, two text fonts plus
54 symbols, seven colors, drawing at several zoom scales, and square and
55 hexagonal backdrop grids for easier alignment.
56 '';
57 license = lib.licenses.mit;
58 maintainers = [ ];
59 platforms = lib.platforms.linux;
60 };
61}