bcal: cleanup package, enable aarch64-darwin build

This commit is contained in:
Pavol Rusnak 2021-05-19 16:35:59 +02:00
parent e62ec73827
commit 6996896b48
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D

View file

@ -1,6 +1,10 @@
{ lib, stdenv, fetchFromGitHub, python3Packages, readline, bc }: { lib
, stdenv
with lib; , fetchFromGitHub
, readline
, bc
, python3Packages
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "bcal"; pname = "bcal";
@ -13,23 +17,21 @@ stdenv.mkDerivation rec {
sha256 = "4vR5rcbNkoEdSRNoMH9qMHP3iWFxejkVfXNiYfwbo/A="; sha256 = "4vR5rcbNkoEdSRNoMH9qMHP3iWFxejkVfXNiYfwbo/A=";
}; };
nativeBuildInputs = [ python3Packages.pytest ];
buildInputs = [ readline ]; buildInputs = [ readline ];
installFlags = [ "PREFIX=$(out)" ];
doCheck = true; doCheck = true;
checkInputs = [ bc ];
checkPhase = ''
python3 -m pytest test.py
'';
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; checkInputs = [ bc python3Packages.pytestCheckHook ];
meta = { pytestFlagsArray = [ "test.py" ];
meta = with lib; {
description = "Storage conversion and expression calculator"; description = "Storage conversion and expression calculator";
homepage = "https://github.com/jarun/bcal"; homepage = "https://github.com/jarun/bcal";
license = licenses.gpl3Only; license = licenses.gpl3Only;
platforms = [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; platforms = platforms.unix;
maintainers = with maintainers; [ jfrankenau ]; maintainers = with maintainers; [ jfrankenau ];
}; };
} }