summary refs log tree commit diff
path: root/pkgs/applications/science/math/nasc/default.nix
diff options
context:
space:
mode:
authorSam Parkinson <sam@sam.today>2018-03-10 22:21:36 +1100
committerSam Parkinson <sam@sam.today>2018-03-10 22:21:36 +1100
commit28a67ec16aa0b68dd4b11949df97186fab23c520 (patch)
treeb0448195becb951e8b74266c07d53efe67c428f3 /pkgs/applications/science/math/nasc/default.nix
parentf8926fbcc9e67ac5abc2a404db4c70acc05bea72 (diff)
downloadnixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar.gz
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar.bz2
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar.lz
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar.xz
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.tar.zst
nixpkgs-28a67ec16aa0b68dd4b11949df97186fab23c520.zip
nasc: init at 0.4.6
Diffstat (limited to 'pkgs/applications/science/math/nasc/default.nix')
-rw-r--r--pkgs/applications/science/math/nasc/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/nasc/default.nix b/pkgs/applications/science/math/nasc/default.nix
new file mode 100644
index 00000000000..8efe8d9da94
--- /dev/null
+++ b/pkgs/applications/science/math/nasc/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, bash
+, gnused
+, fetchFromGitHub
+, gettext
+, pkgconfig
+, gtk3
+, granite
+, gnome3
+, cmake
+, ninja
+, vala
+, libqalculate
+, elementary-cmake-modules
+, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  name = "nasc-${version}";
+  version = "0.4.6";
+
+  src = fetchFromGitHub {
+    owner = "parnold-x";
+    repo = "nasc";
+    rev = version;
+    sha256 = "01n4ldj5phrsv97vb04qvs9c1ip6v8wygx9llj704hly1il9fb54";
+  };
+
+  XDG_DATA_DIRS = stdenv.lib.concatStringsSep ":" [
+    "${granite}/share"
+    "${gnome3.libgee}/share"
+  ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    wrapGAppsHook
+    vala
+    cmake
+    gettext
+  ];
+  buildInputs = [
+    libqalculate
+    gtk3
+    granite
+    gnome3.libgee
+    gnome3.libsoup
+    gnome3.gtksourceview
+  ];
+
+  prePatch = ''
+    substituteInPlace ./libqalculatenasc/libtool \
+      --replace "/bin/bash" "${bash}/bin/bash" \
+      --replace "/bin/sed" "${gnused}/bin/sed"
+    substituteInPlace ./libqalculatenasc/configure.inc \
+      --replace 'ac_default_path="/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"' 'ac_default_path=$PATH'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Do maths like a normal person";
+    longDescription = ''
+      It’s an app where you do maths like a normal person. It lets you
+      type whatever you want and smartly figures out what is math and
+      spits out an answer on the right pane. Then you can plug those
+      answers in to future equations and if that answer changes, so does
+      the equations it’s used in.
+    '';
+    homepage = https://github.com/parnold-x/nasc;
+    maintainers = with maintainers; [ samdroid-apps ];
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+  };
+}