nixpkgs/pkgs/applications/science/math/bcal/default.nix

36 lines
815 B
Nix
Raw Normal View History

2020-12-27 07:49:53 -08:00
{ stdenv, fetchFromGitHub, python3Packages, readline, bc }:
2018-02-20 10:29:04 -08:00
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "bcal";
2020-12-27 07:49:53 -08:00
version = "2.2";
2018-02-20 10:29:04 -08:00
src = fetchFromGitHub {
owner = "jarun";
repo = "bcal";
rev = "v${version}";
2020-12-27 07:49:53 -08:00
sha256 = "4vR5rcbNkoEdSRNoMH9qMHP3iWFxejkVfXNiYfwbo/A=";
2018-02-20 10:29:04 -08:00
};
nativeBuildInputs = [ python3Packages.pytest ];
2018-08-03 00:08:26 -07:00
buildInputs = [ readline ];
doCheck = true;
2020-12-27 07:49:53 -08:00
checkInputs = [ bc ];
2018-02-20 10:29:04 -08:00
checkPhase = ''
python3 -m pytest test.py
'';
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
meta = {
description = "Storage conversion and expression calculator";
homepage = "https://github.com/jarun/bcal";
2020-12-27 07:49:53 -08:00
license = licenses.gpl3Only;
platforms = [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ];
2018-02-20 10:29:04 -08:00
maintainers = with maintainers; [ jfrankenau ];
};
}