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.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
new file mode 100644
index 000000000000..e393111590a8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, intltool, autoreconfHook, pkgconfig, libqalculate, gtk3, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "qalculate-gtk";
+  version = "3.8.0a";
+
+  src = fetchFromGitHub {
+    owner = "qalculate";
+    repo = "qalculate-gtk";
+    rev = "v${version}";
+    sha256 = "0bjd61bbc5b2i09kz3ss01c0xmxrhmiv5wpbhhplkp3yhw2qrf3m";
+  };
+
+  patchPhase = ''
+    substituteInPlace src/main.cc --replace 'getPackageDataDir().c_str()' \"$out/share\"
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ intltool pkgconfig autoreconfHook wrapGAppsHook ];
+  buildInputs = [ libqalculate gtk3 ];
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "The ultimate desktop calculator";
+    homepage = "http://qalculate.github.io";
+    maintainers = with maintainers; [ gebner ];
+    platforms = platforms.all;
+  };
+}