14 withAutocomplete ? true,
15 withSandboxSupport ? false,
19 python3Packages.buildPythonApplication rec {
20 pname = "nixpkgs-review";
24 src = fetchFromGitHub {
26 repo = "nixpkgs-review";
27 rev = "refs/tags/${version}";
28 hash = "sha256-yNdBqL3tceuoUHx8/j2y5ZTq1zeVDAm37RZtlCbC6rg=";
32 python3Packages.setuptools
35 dependencies = lib.optionals withAutocomplete [
36 python3Packages.argcomplete
43 ++ lib.optionals withAutocomplete [
44 python3Packages.argcomplete
52 ] ++ lib.optional withSandboxSupport bubblewrap ++ lib.optional withNom nix-output-monitor;
55 "--prefix PATH : ${lib.makeBinPath binPath}"
56 "--set-default NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt"
57 # we don't have any runtime deps but nixpkgs-review shells might inject unwanted dependencies
61 postInstall = lib.optionalString withAutocomplete ''
62 for cmd in nix-review nixpkgs-review; do
63 installShellCompletion --cmd $cmd \
64 --bash <(register-python-argcomplete $cmd) \
65 --fish <(register-python-argcomplete $cmd -s fish) \
66 --zsh <(register-python-argcomplete $cmd -s zsh)
73 versionCheckProgramArg = [ "--version" ];
76 changelog = "https://github.com/Mic92/nixpkgs-review/releases/tag/${version}";
77 description = "Review pull-requests on https://github.com/NixOS/nixpkgs";
78 homepage = "https://github.com/Mic92/nixpkgs-review";
79 license = lib.licenses.mit;
80 mainProgram = "nixpkgs-review";
81 maintainers = with lib.maintainers; [