blob: d688a50f28d3951846b32de435546fd90e1ed13b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{ lib
, mkDerivation
, fetchurl
, cmake
, pkg-config
, wrapQtAppsHook
, hicolor-icon-theme
, openbabel
, desktop-file-utils
, qttranslations
}:
mkDerivation rec {
pname = "molsketch";
version = "0.8.0";
src = fetchurl {
url = "mirror://sourceforge/molsketch/Molsketch-${version}-src.tar.gz";
hash = "sha256-Mpx4fHktxqBAkmdwqg2pXvEgvvGUQPbgqxKwXKjhJuQ=";
};
# uses C++17 APIs like std::transform_reduce
postPatch = ''
substituteInPlace molsketch/CMakeLists.txt \
--replace "CXX_STANDARD 14" "CXX_STANDARD 17"
substituteInPlace libmolsketch/CMakeLists.txt \
--replace "CXX_STANDARD 14" "CXX_STANDARD 17"
substituteInPlace obabeliface/CMakeLists.txt \
--replace "CXX_STANDARD 14" "CXX_STANDARD 17"
'';
preConfigure = ''
cmakeFlags="$cmakeFlags -DMSK_PREFIX=$out"
'';
postFixup = ''
mv $out/lib/molsketch/* $out/lib
'';
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
buildInputs = [
hicolor-icon-theme
openbabel
desktop-file-utils
qttranslations
];
meta = with lib; {
description = "2D molecule editor";
homepage = "https://sourceforge.net/projects/molsketch/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.fortuneteller2k ];
};
}
|