From ff4a1cf4d8a8c3566b059786ca3326b1ce282b47 Mon Sep 17 00:00:00 2001 From: MetaDark Date: Thu, 29 Oct 2020 18:10:39 -0400 Subject: [PATCH] git-review: build with python3 Also updated source to the new repo and added myself as a maintainer --- .../version-management/git-review/default.nix | 21 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/version-management/git-review/default.nix b/pkgs/applications/version-management/git-review/default.nix index c7702cfa1951..d0bbca15ea17 100644 --- a/pkgs/applications/version-management/git-review/default.nix +++ b/pkgs/applications/version-management/git-review/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, pythonPackages} : +{ lib, fetchurl, buildPythonApplication, pbr, requests, setuptools }: -pythonPackages.buildPythonApplication rec { +buildPythonApplication rec { pname = "git-review"; version = "1.28.0"; @@ -8,21 +8,20 @@ pythonPackages.buildPythonApplication rec { # upstream repository (and we are installing from tarball instead) PBR_VERSION = version; - src = fetchFromGitHub { - owner = "openstack-infra"; - repo = pname; - rev = version; - sha256 = "1hgw1dkl94m3idv4izc7wf2j7al2c7nnsqywy7g53nzkv9pfv47s"; + src = fetchurl { + url = "https://opendev.org/opendev/${pname}/archive/${version}.tar.gz"; + sha256 = "1y1jzb0hlprynwwr4q5y4x06641qrhj0k69mclabnmhfam9g8ygm"; }; - propagatedBuildInputs = with pythonPackages; [ pbr requests setuptools ]; + propagatedBuildInputs = [ pbr requests setuptools ]; # Don't do tests because they require gerrit which is not packaged doCheck = false; - meta = { - homepage = "https://github.com/openstack-infra/git-review"; + meta = with lib; { + homepage = "https://opendev.org/opendev/git-review"; description = "Tool to submit code to Gerrit"; - license = stdenv.lib.licenses.asl20; + license = licenses.asl20; + maintainers = with maintainers; [ metadark ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a37fab7ec3db..64c08133c688 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21055,7 +21055,7 @@ in git-quick-stats = callPackage ../development/tools/git-quick-stats {}; - git-review = callPackage ../applications/version-management/git-review { }; + git-review = python3Packages.callPackage ../applications/version-management/git-review { }; github-cli = gitAndTools.gh;