Merge pull request #123689 from prusnak/bcal

bcal: cleanup package, enable aarch64-darwin build
This commit is contained in:
Pavol Rusnak 2021-05-19 17:47:35 +02:00 committed by GitHub
commit f7ed00be13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
{ lib, stdenv, fetchFromGitHub, python3Packages, readline, bc }:
with lib;
{ lib
, stdenv
, fetchFromGitHub
, readline
, bc
, python3Packages
}:
stdenv.mkDerivation rec {
pname = "bcal";
@ -13,23 +17,21 @@ stdenv.mkDerivation rec {
sha256 = "4vR5rcbNkoEdSRNoMH9qMHP3iWFxejkVfXNiYfwbo/A=";
};
nativeBuildInputs = [ python3Packages.pytest ];
buildInputs = [ readline ];
installFlags = [ "PREFIX=$(out)" ];
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";
homepage = "https://github.com/jarun/bcal";
license = licenses.gpl3Only;
platforms = [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ];
platforms = platforms.unix;
maintainers = with maintainers; [ jfrankenau ];
};
}