summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorRobert T. McGibbon <rmcgibbo@gmail.com>2020-11-22 17:02:20 -0500
committerRobert T. McGibbon <rmcgibbo@gmail.com>2020-12-08 16:33:11 -0500
commit35bab12ed08e2b9d3d1f9f32b5b4ea7ed534256a (patch)
tree2ab60f5df2756ffc8ff13e42b633693bed1390d2 /pkgs
parent925b70cd964ceaedee26fde9b19cc4c4f081196a (diff)
inchi: init at 1.05
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/inchi/default.nix51
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/libraries/inchi/default.nix b/pkgs/development/libraries/inchi/default.nix
new file mode 100644
index 000000000000..869011007599
--- /dev/null
+++ b/pkgs/development/libraries/inchi/default.nix
@@ -0,0 +1,51 @@
+{ pkgs, fetchurl, stdenv, unzip }:
+stdenv.mkDerivation {
+ pname = "inchi";
+ version = "1.05";
+ src = fetchurl {
+ url = "http://www.inchi-trust.org/download/105/INCHI-1-SRC.zip";
+ sha1 = "e3872a46d58cb321a98f4fd4b93a989fb6920b9c";
+ };
+
+ nativeBuildInputs = [ pkgs.unzip ];
+ outputs = [ "out" "doc" ];
+
+ enableParallelBuilding = true;
+
+ preBuild = ''
+ cd ./INCHI_API/libinchi/gcc
+ '';
+ installPhase = ''
+ cd ../../..
+ mkdir -p $out/lib
+ mkdir -p $out/include/inchi
+ mkdir -p $doc/share/
+
+ install -m 755 INCHI_API/bin/Linux/libinchi.so.1.05.00 $out/lib
+ ln -s $out/lib/libinchi.so.1.05.00 $out/lib/libinchi.so.1
+ ln -s $out/lib/libinchi.so.1.05.00 $out/lib/libinchi.so
+ install -m 644 INCHI_BASE/src/*.h $out/include/inchi
+
+ runHook postInstall
+ '';
+
+ postInstall =
+ let
+ src-doc = fetchurl {
+ url = "http://www.inchi-trust.org/download/105/INCHI-1-DOC.zip";
+ sha1 = "2f54y0san34v01c215kk0cigzsn76js5";
+ };
+ in
+ ''
+ unzip '${src-doc}'
+ install -m 644 INCHI-1-DOC/*.pdf $doc/share
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://www.inchi-trust.org/";
+ description = "IUPAC International Chemical Identifier library";
+ license = licenses.lgpl2Plus;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ rmcgibbo ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e198d3ca5d16..cab1f9500485 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2312,6 +2312,8 @@ in
icdiff = callPackage ../tools/text/icdiff {};
+ inchi = callPackage ../development/libraries/inchi {};
+
ifm = callPackage ../tools/graphics/ifm {};
ink = callPackage ../tools/misc/ink { };