2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
, bubblewrap
|
|
|
|
, cacert
|
2020-04-24 23:36:52 +00:00
|
|
|
, git
|
2022-06-16 17:23:12 +00:00
|
|
|
, nix
|
|
|
|
|
|
|
|
, withSandboxSupport ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "nixpkgs-review";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "2.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "nixpkgs-review";
|
|
|
|
rev = version;
|
2022-12-28 21:21:41 +00:00
|
|
|
sha256 = "sha256-v8IRRmONb10sPndfsuaUYMrGbbosj48cbfgANZCtIN0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
makeWrapperArgs =
|
|
|
|
let
|
|
|
|
binPath = [ nix git ] ++ lib.optional withSandboxSupport bubblewrap;
|
|
|
|
in
|
|
|
|
[
|
|
|
|
"--prefix PATH : ${lib.makeBinPath binPath}"
|
|
|
|
"--set NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
# we don't have any runtime deps but nix-review shells might inject unwanted dependencies
|
|
|
|
"--unset PYTHONPATH"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Review pull-requests on https://github.com/NixOS/nixpkgs";
|
|
|
|
homepage = "https://github.com/Mic92/nixpkgs-review";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/Mic92/nixpkgs-review/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ figsoda mic92 SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|