Merge pull request #240500 from fortuneteller2k/molsketch

This commit is contained in:
Sandro 2023-06-29 14:12:03 +02:00 committed by GitHub
commit 29f5e51d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,9 @@
{ lib { lib
, stdenv
, mkDerivation , mkDerivation
, fetchurl , fetchurl
, cmake , cmake
, pkg-config , pkg-config
, wrapQtAppsHook
, hicolor-icon-theme , hicolor-icon-theme
, openbabel , openbabel
, desktop-file-utils , desktop-file-utils
@ -12,18 +12,32 @@
mkDerivation rec { mkDerivation rec {
pname = "molsketch"; pname = "molsketch";
version = "0.7.3"; version = "0.8.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/molsketch/Molsketch-${version}-src.tar.gz"; url = "mirror://sourceforge/molsketch/Molsketch-${version}-src.tar.gz";
hash = "sha256-82iNJRiXqESwidjifKBf0+ljcqbFD1WehsXI8VUgrwQ="; 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 = '' preConfigure = ''
cmakeFlags="$cmakeFlags -DMSK_PREFIX=$out" cmakeFlags="$cmakeFlags -DMSK_PREFIX=$out"
''; '';
nativeBuildInputs = [ cmake pkg-config ]; postFixup = ''
mv $out/lib/molsketch/* $out/lib
'';
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
buildInputs = [ buildInputs = [
hicolor-icon-theme hicolor-icon-theme
openbabel openbabel