about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math')
-rw-r--r--nixpkgs/pkgs/applications/science/math/4ti2/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix34
2 files changed, 72 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/4ti2/default.nix b/nixpkgs/pkgs/applications/science/math/4ti2/default.nix
new file mode 100644
index 000000000000..bb6a89385ce0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/4ti2/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, glpk
+, gmp
+}:
+
+stdenv.mkDerivation rec{
+  pname = "4ti2";
+  version = "1.6.9";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "Release_${builtins.replaceStrings ["."] ["_"] version}";
+    hash = "sha256-cywneIM0sHt1iQsNfjyQDoDfdRjxpz4l3rfysi9YN20=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    glpk
+    gmp
+  ];
+
+  installFlags = [ "install-exec" ];
+
+  meta = with lib;{
+    homepage = "https://4ti2.github.io/";
+    description = "A software package for algebraic, geometric and combinatorial problems on linear spaces";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix b/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix
new file mode 100644
index 000000000000..0238e5333577
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix
@@ -0,0 +1,34 @@
+{ lib, gccStdenv, fetchFromGitHub, ncurses }:
+
+gccStdenv.mkDerivation rec {
+  pname = "programmer-calculator";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "alt-romes";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1vvpbj24ijl9ma0h669n9x0z1im3vqdf8zf2li0xf5h97b14gmv0";
+  };
+
+  buildInputs = [ ncurses ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm 555 pcalc -t "$out/bin"
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A terminal calculator for programmers";
+    longDescription = ''
+      Terminal calculator made for programmers working with multiple number
+      representations, sizes, and overall close to the bits
+    '';
+    homepage = "https://alt-romes.github.io/programmer-calculator";
+    changelog = "https://github.com/alt-romes/programmer-calculator/releases/tag/v${version}";
+    license = licenses.gpl3Only;
+    maintainers = with lib.maintainers; [ cjab ];
+    platforms = platforms.all;
+  };
+}