From aefd9572f6a717396a91ed631cfcb821f5a7c6e2 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 22 Feb 2024 09:26:44 +0100 Subject: [PATCH] pkgs/lewis: init at 1.3.1 --- pkgs/default.nix | 3 ++ pkgs/epnix/tools/lewis/default.nix | 55 ++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/epnix/tools/lewis/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 7cd77f1b..d9ba62af 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -10,6 +10,7 @@ in mkEpicsPackage = callPackage ./build-support/mk-epics-package.nix {}; python3Packages = prev.python3Packages.overrideScope (final: prev: { + lewis = final.callPackage ./epnix/tools/lewis {}; scanf = final.callPackage ./epnix/tools/scanf {}; }); @@ -48,6 +49,8 @@ in ca-gateway = callPackage ./epnix/tools/ca-gateway {}; + inherit (final.python3Packages) lewis; + pcas = callPackage ./epnix/tools/pcas {}; phoebus = callPackage ./epnix/tools/phoebus/client { diff --git a/pkgs/epnix/tools/lewis/default.nix b/pkgs/epnix/tools/lewis/default.nix new file mode 100644 index 00000000..1a67da55 --- /dev/null +++ b/pkgs/epnix/tools/lewis/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + approvaltests, + setuptools, + wheel, + json-rpc, + mock, + pytest, + pyyaml, + pyzmq, + scanf, + semantic-version, +}: +buildPythonPackage rec { + pname = "lewis"; + version = "1.3.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ess-dmsc"; + repo = "lewis"; + rev = "v${version}"; + hash = "sha256-7iMREHt6W26IzCFsRmojHqGuqIUHaCuvsKMMHuYflz0="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + json-rpc + pyyaml + pyzmq + scanf + semantic-version + ]; + + checkInputs = [ + approvaltests + mock + pytest + ]; + + pythonImportsCheck = ["lewis"]; + + meta = with lib; { + description = "Let's write intricate simulators"; + homepage = "https://github.com/ess-dmsc/lewis"; + license = licenses.gpl3Only; + maintainers = with maintainers; [minijackson]; + }; +}