tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
inchi: fix build on darwin
Robert T. McGibbon
5 years ago
e90ec60e
86d5d965
+22
-4
1 changed file
expand all
collapse all
unified
split
pkgs
development
libraries
inchi
default.nix
+22
-4
pkgs/development/libraries/inchi/default.nix
reviewed
···
1
1
-
{ pkgs, fetchurl, lib, stdenv, unzip }:
1
1
+
{ pkgs
2
2
+
, fetchurl
3
3
+
, lib
4
4
+
, stdenv
5
5
+
, unzip
6
6
+
, fixDarwinDylibNames
7
7
+
}:
8
8
+
2
9
stdenv.mkDerivation {
3
10
pname = "inchi";
4
11
version = "1.05";
···
7
14
sha1 = "e3872a46d58cb321a98f4fd4b93a989fb6920b9c";
8
15
};
9
16
10
10
-
nativeBuildInputs = [ pkgs.unzip ];
17
17
+
nativeBuildInputs = [ unzip ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
11
18
outputs = [ "out" "doc" ];
12
19
13
20
enableParallelBuilding = true;
14
21
15
15
-
preBuild = ''
22
22
+
preConfigure = ''
16
23
cd ./INCHI_API/libinchi/gcc
24
24
+
'' + lib.optionalString stdenv.isDarwin ''
25
25
+
substituteInPlace makefile \
26
26
+
--replace ",--version-script=libinchi.map" "" \
27
27
+
--replace "LINUX_Z_RELRO = ,-z,relro" "" \
28
28
+
--replace "-soname" "-install_name" \
29
29
+
--replace "gcc" $CC
17
30
'';
18
31
installPhase = ''
32
32
+
runHook preInstall
33
33
+
19
34
cd ../../..
20
35
mkdir -p $out/lib
21
36
mkdir -p $out/include/inchi
···
27
42
install -m 644 INCHI_BASE/src/*.h $out/include/inchi
28
43
29
44
runHook postInstall
45
45
+
'';
46
46
+
47
47
+
preFixup = lib.optionalString stdenv.isDarwin ''
48
48
+
fixDarwinDylibNames $(find "$out" -name "*.so.*")
30
49
'';
31
50
32
51
postInstall =
···
45
64
homepage = "https://www.inchi-trust.org/";
46
65
description = "IUPAC International Chemical Identifier library";
47
66
license = licenses.lgpl2Plus;
48
48
-
platforms = platforms.all;
49
67
maintainers = with maintainers; [ rmcgibbo ];
50
68
};
51
69
}