about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authormarkuskowa <markus.kowalewski@gmail.com>2024-02-20 14:25:01 +0100
committerGitHub <noreply@github.com>2024-02-20 14:25:01 +0100
commita39a9ee214c08e3a8b7b6d8b910d6523b6e42b99 (patch)
tree6c587ab29c50a9cf23b774ead4462b04faf119a9 /pkgs/applications/editors
parent878146da3f6b9e6000dffe29c783b834763b613d (diff)
parentf5b315ae54f5b7f13519ae4275a5426661d028ee (diff)
downloadnixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar.gz
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar.bz2
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar.lz
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar.xz
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.tar.zst
nixlib-a39a9ee214c08e3a8b7b6d8b910d6523b6e42b99.zip
Merge pull request #288514 from sheepforce/avogadro2
avogadro2: 1.98.1 -> 1.99.0
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/molsketch/default.nix6
-rw-r--r--pkgs/applications/editors/molsketch/openbabel.patch12
2 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/applications/editors/molsketch/default.nix b/pkgs/applications/editors/molsketch/default.nix
index 6a656114ff5f..d0c05d27e88c 100644
--- a/pkgs/applications/editors/molsketch/default.nix
+++ b/pkgs/applications/editors/molsketch/default.nix
@@ -19,6 +19,10 @@ mkDerivation rec {
     hash = "sha256-Mpx4fHktxqBAkmdwqg2pXvEgvvGUQPbgqxKwXKjhJuQ=";
   };
 
+  patches = [
+    ./openbabel.patch
+  ];
+
   # uses C++17 APIs like std::transform_reduce
   postPatch = ''
     substituteInPlace molsketch/CMakeLists.txt \
@@ -34,7 +38,7 @@ mkDerivation rec {
   '';
 
   postFixup = ''
-    mv $out/lib/molsketch/* $out/lib
+    ln -s $out/lib/molsketch/* $out/lib/.
   '';
 
   nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
diff --git a/pkgs/applications/editors/molsketch/openbabel.patch b/pkgs/applications/editors/molsketch/openbabel.patch
new file mode 100644
index 000000000000..80786bbab4dd
--- /dev/null
+++ b/pkgs/applications/editors/molsketch/openbabel.patch
@@ -0,0 +1,12 @@
+diff --git a/obabeliface/obabeliface.cpp b/obabeliface/obabeliface.cpp
+index 98a9020..a168803 100644
+--- a/obabeliface/obabeliface.cpp
++++ b/obabeliface/obabeliface.cpp
+@@ -196,6 +196,7 @@ namespace Molsketch
+ 
+   // TODO should be const, but OpenBabel iterator methods do not support const
+   bool hasCoordinates(OpenBabel::OBMol &molecule) {
++    using namespace OpenBabel;
+     FOR_ATOMS_OF_MOL(obatom, molecule) {
+       if (obatom->GetVector() != OpenBabel::VZero)
+         return true;