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