2021-04-26 19:14:03 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitea
|
2021-04-26 19:14:03 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, pbr
|
|
|
|
, requests
|
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
, genericUpdater
|
|
|
|
, common-updater-scripts
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "git-review";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Manually set version because prb wants to get it from the git
|
|
|
|
# upstream repository (and we are installing from tarball instead)
|
|
|
|
PBR_VERSION = version;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "opendev.org";
|
|
|
|
owner = "opendev";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-2+X5fPxB2FIp1fwqEUc+W0gH2NjhF/V+La+maE+XEpo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
setuptools # implicit dependency, used to get package version through pkg_resources
|
|
|
|
];
|
|
|
|
|
|
|
|
# Don't run tests because they pull in external dependencies
|
|
|
|
# (a specific build of gerrit + maven plugins), and I haven't figured
|
|
|
|
# out how to work around this yet.
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
pythonImportsCheck = [ "git_review" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.updateScript = genericUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
|
|
|
|
};
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool to submit code to Gerrit";
|
2021-04-26 19:14:03 +00:00
|
|
|
homepage = "https://opendev.org/opendev/git-review";
|
2020-11-03 02:18:15 +00:00
|
|
|
license = licenses.asl20;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|