summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-review/default.nix
blob: 37053b7f7a0c35283c118ec2a4b9ec4f4db44f86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, fetchFromGitea
, buildPythonApplication
, pbr
, requests
, setuptools
, gitUpdater
}:

buildPythonApplication rec {
  pname = "git-review";
  version = "2.3.0";

  # Manually set version because prb wants to get it from the git
  # upstream repository (and we are installing from tarball instead)
  PBR_VERSION = version;

  src = fetchFromGitea {
    domain = "opendev.org";
    owner = "opendev";
    repo = pname;
    rev = version;
    sha256 = "sha256-ENrv2jx59iNA/hALFg6+gOz8zxJaoiCwYcAh1xeEOR0=";
  };

  outputs = [ "out" "man" ];

  nativeBuildInputs = [
    pbr
  ];

  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.
  doCheck = false;

  pythonImportsCheck = [ "git_review" ];

  passthru.updateScript = gitUpdater { inherit pname version; };

  meta = with lib; {
    description = "Tool to submit code to Gerrit";
    homepage = "https://opendev.org/opendev/git-review";
    license = licenses.asl20;
    maintainers = with maintainers; [ kira-bruneau ];
  };
}