diff --git a/pkgs/applications/graphics/fig2dev/default.nix b/pkgs/applications/graphics/fig2dev/default.nix index 667f5afe5793..99e8478224f4 100644 --- a/pkgs/applications/graphics/fig2dev/default.nix +++ b/pkgs/applications/graphics/fig2dev/default.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchurl, ghostscript, libpng, makeWrapper -, coreutils, bc, gnugrep, gawk, gnused } : +{ lib +, stdenv +, fetchurl +, ghostscript +, libpng +, makeWrapper +, coreutils +, bc +, gnugrep +, gawk +, gnused +}: stdenv.mkDerivation rec { pname = "fig2dev"; diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix index 53a9632e1923..8773db5bead6 100644 --- a/pkgs/applications/graphics/xfig/default.nix +++ b/pkgs/applications/graphics/xfig/default.nix @@ -1,5 +1,15 @@ -{ lib, stdenv, fetchurl, xlibsWrapper, makeWrapper, libXpm -, libXmu, libXi, libXp, Xaw3d, libXaw, fig2dev +{ lib +, stdenv +, fetchurl +, xlibsWrapper +, makeWrapper +, libXpm +, libXmu +, libXi +, libXp +, Xaw3d +, libXaw +, fig2dev }: stdenv.mkDerivation rec { @@ -11,6 +21,18 @@ stdenv.mkDerivation rec { sha256 = "1czamqp0xn0j6qjnasa3fjnrzi072v6qknylr6jrs4gwsfw4ybyw"; }; + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ + xlibsWrapper + libXpm + libXmu + libXi + libXp + Xaw3d + libXaw + ]; + postPatch = '' sed -i 's:"fig2dev":"${fig2dev}/bin/fig2dev":' src/main.c ''; @@ -25,10 +47,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ makeWrapper ]; - - buildInputs = [ xlibsWrapper libXpm libXmu libXi libXp Xaw3d libXaw ]; - meta = with lib; { description = "An interactive drawing tool for X11"; longDescription = '' diff --git a/pkgs/applications/science/chemistry/chemtool/default.nix b/pkgs/applications/science/chemistry/chemtool/default.nix new file mode 100644 index 000000000000..3b5d144ba22b --- /dev/null +++ b/pkgs/applications/science/chemistry/chemtool/default.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, fetchurl +, pkg-config +, libX11 +, gtk2 +, fig2dev +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "chemtool"; + version = "1.6.14"; + + src = fetchurl { + url = "http://ruby.chemie.uni-freiburg.de/~martin/${pname}/${pname}-${version}.tar.gz"; + sha256 = "hhYaBGE4azNKX/sXzfCUpJGUGIRngnL0V0mBNRTdr8s="; + }; + + nativeBuildInputs = [ pkg-config wrapGAppsHook ]; + buildInputs = [ + libX11 + gtk2 + fig2dev + ]; + + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}") + ''; + + meta = with lib; { + homepage = "http://ruby.chemie.uni-freiburg.de/~martin/chemtool/"; + description = "Draw chemical structures"; + longDescription = '' + Chemtool is a program for drawing organic molecules. It runs under the X + Window System using the GTK widget set. + + Most operations in chemtool can be accomplished using the mouse - the + first (usually the left) button is used to select or place things, the + middle button modifies properties (e.g. reverses the direction of a bond), + and the right button is used to delete objects. + + The program offers essentially unlimited undo/redo, two text fonts plus + symbols, seven colors, drawing at several zoom scales, and square and + hexagonal backdrop grids for easier alignment. + ''; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a34c0778c2a0..fcff4c2ce283 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27404,6 +27404,8 @@ in eigen = eigen2; }; + chemtool = callPackage ../applications/science/chemistry/chemtool { }; + d-seams = callPackage ../applications/science/chemistry/d-seams {}; gwyddion = callPackage ../applications/science/chemistry/gwyddion {};