From 2cf8ec7672a615a6443152a121564d88fb89b01d Mon Sep 17 00:00:00 2001 From: fortuneteller2k Date: Thu, 29 Jun 2023 16:53:59 +0800 Subject: [PATCH] molsketch: 0.7.3 -> 0.8.0 --- .../editors/molsketch/default.nix | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/molsketch/default.nix b/pkgs/applications/editors/molsketch/default.nix index cb94cef3a328..d688a50f28d3 100644 --- a/pkgs/applications/editors/molsketch/default.nix +++ b/pkgs/applications/editors/molsketch/default.nix @@ -1,9 +1,9 @@ { lib -, stdenv , mkDerivation , fetchurl , cmake , pkg-config +, wrapQtAppsHook , hicolor-icon-theme , openbabel , desktop-file-utils @@ -12,18 +12,32 @@ mkDerivation rec { pname = "molsketch"; - version = "0.7.3"; + version = "0.8.0"; src = fetchurl { 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 = '' cmakeFlags="$cmakeFlags -DMSK_PREFIX=$out" ''; - nativeBuildInputs = [ cmake pkg-config ]; + postFixup = '' + mv $out/lib/molsketch/* $out/lib + ''; + + nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; buildInputs = [ hicolor-icon-theme openbabel