about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/bcal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/bcal/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/math/bcal/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/bcal/default.nix b/nixpkgs/pkgs/applications/science/math/bcal/default.nix
new file mode 100644
index 000000000000..61eb1fd3ce4e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/bcal/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, python3Packages, readline }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "bcal-${version}";
+  version = "1.9";
+
+  src = fetchFromGitHub {
+    owner = "jarun";
+    repo = "bcal";
+    rev = "v${version}";
+    sha256 = "0h6qi5rvzl6c6fsfdpdb3l4jcgip03l18i0b1x08z1y89i56y8mm";
+  };
+
+  nativeBuildInputs = [ python3Packages.pytest ];
+
+  buildInputs = [ readline ];
+
+  doCheck = true;
+  checkPhase = ''
+    python3 -m pytest test.py
+  '';
+
+  installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = {
+    description = "Storage conversion and expression calculator";
+    homepage = https://github.com/jarun/bcal;
+    license = licenses.gpl3;
+    platforms = [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ];
+    maintainers = with maintainers; [ jfrankenau ];
+  };
+}