Merge pull request #111697 from AndersonTorres/chemtool

This commit is contained in:
Sandro 2021-02-03 14:45:50 +01:00 committed by GitHub
commit 9a15b4dd19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 88 additions and 8 deletions

View File

@ -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";

View File

@ -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 = ''

View File

@ -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 ];
};
}

View File

@ -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 {};