about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
index e393111590a8..df622e7303d4 100644
--- a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
@@ -2,17 +2,25 @@
 
 stdenv.mkDerivation rec {
   pname = "qalculate-gtk";
-  version = "3.8.0a";
+  version = "3.12.1";
 
   src = fetchFromGitHub {
     owner = "qalculate";
     repo = "qalculate-gtk";
     rev = "v${version}";
-    sha256 = "0bjd61bbc5b2i09kz3ss01c0xmxrhmiv5wpbhhplkp3yhw2qrf3m";
+    sha256 = "0ylsxj9rn3dc1grn9w6jisci3ak0hxgbwzqp54azs3aj5cmvkfgg";
   };
 
   patchPhase = ''
-    substituteInPlace src/main.cc --replace 'getPackageDataDir().c_str()' \"$out/share\"
+    # The gnome-search-provider2.c file generated by gdbus-codegen depends
+    # on gio-unix-2.0, which is a Requires.private of gtk+-3.0,
+    # and private dependencies are dropped in our default patched pkg-config.
+    # https://github.com/Qalculate/qalculate-gtk/pull/178
+    # https://github.com/NixOS/nixpkgs/issues/292
+    substituteInPlace configure.ac --replace 'libxml-2.0' 'libxml-2.0 gio-unix-2.0'
+
+    # https://github.com/Qalculate/qalculate-gtk/pull/179
+    echo searchprovider.o: gnome-search-provider2.c >>src/Makefile.am
   '';
 
   hardeningDisable = [ "format" ];
@@ -25,6 +33,7 @@ stdenv.mkDerivation rec {
     description = "The ultimate desktop calculator";
     homepage = "http://qalculate.github.io";
     maintainers = with maintainers; [ gebner ];
+    license = licenses.gpl2Plus;
     platforms = platforms.all;
   };
 }