biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / by-name / zx / zxpy / package.nix
blob650a220250cb71a72158f7abf221d7a4fefe0257
1 { lib
2 , python3
3 , fetchFromGitHub
4 , fetchpatch
5 , deterministic-uname
6 }:
8 python3.pkgs.buildPythonApplication rec {
9   pname = "zxpy";
10   version = "1.6.3";
11   format = "pyproject";
13   src = fetchFromGitHub {
14     owner = "tusharsadhwani";
15     repo = "zxpy";
16     rev = version;
17     hash = "sha256-/sOLSIqaAUkaAghPqe0Zoq7C8CSKAd61o8ivtjJFcJY=";
18   };
20   patches = [
21     # fix test caused by `uname -p` printing unknown
22     # https://github.com/tusharsadhwani/zxpy/pull/53
23     (fetchpatch {
24       name = "allow-unknown-processor-in-injection-test.patch";
25       url = "https://github.com/tusharsadhwani/zxpy/commit/95ad80caddbab82346f60ad80a601258fd1238c9.patch";
26       hash = "sha256-iXasOKjWuxNjjTpb0umNMNhbFgBjsu5LsOpTaXllATM=";
27     })
28   ];
30   nativeBuildInputs = [
31     python3.pkgs.setuptools
32     python3.pkgs.wheel
33   ];
35   nativeCheckInputs = [
36     deterministic-uname
37     python3.pkgs.pytestCheckHook
38   ];
40   preCheck = ''
41     export PATH=$out/bin:$PATH
42   '';
44   pythonImportsCheck = [ "zx" ];
46   meta = with lib; {
47     description = "Shell scripts made simple";
48     homepage = "https://github.com/tusharsadhwani/zxpy";
49     changelog = "https://github.com/tusharsadhwani/zxpy/releases/tag/${version}";
50     license = licenses.mit;
51     maintainers = with maintainers; [ figsoda ];
52     mainProgram = "zxpy";
53   };