summary refs log tree commit diff
path: root/pkgs/applications/science/math/bcal/default.nix
blob: 74adcab4e70598094d027b027aed122eb49c07e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchFromGitHub, python3Packages, readline }:

with stdenv.lib;

stdenv.mkDerivation rec {
  pname = "bcal";
  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 ];
  };
}