nixpkgs-suyu/pkgs/applications/editors/molsketch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, mkDerivation
, fetchurl
, cmake
, pkg-config
, qttools
2023-06-29 10:53:59 +02:00
, wrapQtAppsHook
, hicolor-icon-theme
, openbabel
, desktop-file-utils
}:
mkDerivation rec {
pname = "molsketch";
2023-06-29 10:53:59 +02:00
version = "0.8.0";
src = fetchurl {
url = "mirror://sourceforge/molsketch/Molsketch-${version}-src.tar.gz";
2023-06-29 10:53:59 +02:00
hash = "sha256-Mpx4fHktxqBAkmdwqg2pXvEgvvGUQPbgqxKwXKjhJuQ=";
};
2024-02-14 11:22:49 +01:00
patches = [
./openbabel.patch
];
2023-06-29 10:53:59 +02:00
# 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"
'';
2023-06-29 10:53:59 +02:00
postFixup = ''
mv $out/lib/molsketch/* $out/lib
'';
nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
buildInputs = [
hicolor-icon-theme
openbabel
desktop-file-utils
];
meta = with lib; {
description = "2D molecule editor";
homepage = "https://sourceforge.net/projects/molsketch/";
license = licenses.gpl2Plus;
2023-11-17 11:03:27 +01:00
maintainers = [ maintainers.moni ];
2023-11-27 02:17:53 +01:00
mainProgram = "molsketch";
};
}