diff --git a/pkgs/applications/science/math/bcal/default.nix b/pkgs/applications/science/math/bcal/default.nix index 8cbf90a7187c..1494b5324872 100644 --- a/pkgs/applications/science/math/bcal/default.nix +++ b/pkgs/applications/science/math/bcal/default.nix @@ -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 ]; }; }