2022-12-31 02:31:44 +03:00
|
|
|
{ pkgs ? import <nixpkgs> { }
|
2020-12-01 12:31:29 +03:00
|
|
|
}:
|
2020-03-16 13:06:32 +03:00
|
|
|
|
|
|
|
|
2023-05-20 10:00:40 +03:00
|
|
|
pkgs.python311.pkgs.buildPythonApplication {
|
2023-09-30 12:04:21 +03:00
|
|
|
pname = "nix-update";
|
2023-09-30 12:21:04 +03:00
|
|
|
version = "1.0.0";
|
2023-05-20 10:00:40 +03:00
|
|
|
src = ./.;
|
2023-09-30 12:04:21 +03:00
|
|
|
format = "pyproject";
|
2023-05-20 10:00:40 +03:00
|
|
|
buildInputs = [ pkgs.makeWrapper ];
|
2023-09-30 12:04:21 +03:00
|
|
|
nativeBuildInputs = [ pkgs.python311.pkgs.setuptools ];
|
2023-01-24 21:39:11 +03:00
|
|
|
nativeCheckInputs = [
|
2023-05-20 10:00:40 +03:00
|
|
|
pkgs.python311.pkgs.pytest
|
2023-03-21 16:06:58 +03:00
|
|
|
# technically not test inputs, but we need it for development in PATH
|
2023-09-30 12:04:21 +03:00
|
|
|
pkgs.nixVersions.stable
|
2023-05-20 10:00:40 +03:00
|
|
|
pkgs.nix-prefetch-git
|
2020-11-18 11:23:07 +03:00
|
|
|
];
|
2020-03-16 13:06:32 +03:00
|
|
|
checkPhase = ''
|
2023-08-12 11:12:54 +03:00
|
|
|
PYTHONPATH= $out/bin/nix-update --help
|
2020-03-16 13:06:32 +03:00
|
|
|
'';
|
|
|
|
makeWrapperArgs = [
|
2022-12-31 02:31:44 +03:00
|
|
|
"--prefix PATH"
|
|
|
|
":"
|
2024-05-30 20:27:05 +03:00
|
|
|
(pkgs.lib.makeBinPath [ pkgs.nixVersions.stable or pkgs.nix_2_4 pkgs.nixpkgs-review pkgs.nix-prefetch-git ])
|
2020-03-16 13:06:32 +03:00
|
|
|
];
|
|
|
|
shellHook = ''
|
|
|
|
# workaround because `python setup.py develop` breaks for me
|
|
|
|
'';
|
|
|
|
}
|