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-06-16 17:23:12 +00:00
|
|
|
version = "2.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "nixpkgs-review";
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-hGOcLrVPb+bSNA72ZfKE9Mjm2dr/qnuaCkjveHXPcws=";
|
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";
|
|
|
|
license = licenses.mit;
|
2021-08-05 21:33:18 +00:00
|
|
|
maintainers = with maintainers; [ mic92 SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|