summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-05-30 12:49:41 +0100
committerGitHub <noreply@github.com>2021-05-30 12:49:41 +0100
commit07796133d4996fe6d441c879e0608257a8408676 (patch)
tree4ce1d81d7e9c0ce141e131b9f55fce37a963af42
parentMerge pull request #124928 from NixOS/backport-124713-to-release-21.05 (diff)
parentgitRepo: Add updateScript support for easier upgrade in future (diff)
downloadnixpkgs-07796133d4996fe6d441c879e0608257a8408676.tar.gz
Merge pull request #124931 from NixOS/backport-124904-to-release-21.05
[Backport release-21.05] gitRepo: 2.14.5 -> 2.15.3
-rw-r--r--pkgs/applications/version-management/git-repo/default.nix18
-rw-r--r--pkgs/applications/version-management/git-repo/import-ssl-module.patch12
2 files changed, 13 insertions, 17 deletions
diff --git a/pkgs/applications/version-management/git-repo/default.nix b/pkgs/applications/version-management/git-repo/default.nix
index cd6d9b0fd51c..7b29e466160b 100644
--- a/pkgs/applications/version-management/git-repo/default.nix
+++ b/pkgs/applications/version-management/git-repo/default.nix
@@ -1,10 +1,10 @@
-{ lib, stdenv, fetchFromGitHub, makeWrapper
+{ lib, stdenv, fetchFromGitHub, makeWrapper, nix-update-script
, python3, git, gnupg, less
}:
stdenv.mkDerivation rec {
pname = "git-repo";
- version = "2.14.5";
+ version = "2.15.3";
src = fetchFromGitHub {
owner = "android";
@@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
sha256 = "sha256-3FSkWpHda1jVhy/633B+ippWcbKd83IlQcJYS9Qx5wQ=";
};
- patches = [ ./import-ssl-module.patch ];
-
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
@@ -25,8 +23,12 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
+ runHook preInstall
+
mkdir -p $out/bin
cp repo $out/bin/repo
+
+ runHook postInstall
'';
# Important runtime dependencies
@@ -35,6 +37,12 @@ stdenv.mkDerivation rec {
"${lib.makeBinPath [ git gnupg less ]}"
'';
+ passthru = {
+ updateScript = nix-update-script {
+ attrPath = "gitRepo";
+ };
+ };
+
meta = with lib; {
description = "Android's repo management tool";
longDescription = ''
@@ -45,7 +53,7 @@ stdenv.mkDerivation rec {
'';
homepage = "https://android.googlesource.com/tools/repo";
license = licenses.asl20;
- maintainers = [ ];
+ maintainers = with maintainers; [ otavio ];
platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/version-management/git-repo/import-ssl-module.patch b/pkgs/applications/version-management/git-repo/import-ssl-module.patch
deleted file mode 100644
index f1ec4e3a7ddb..000000000000
--- a/pkgs/applications/version-management/git-repo/import-ssl-module.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/repo b/repo
-index 8b05def..f394b3e 100755
---- a/repo
-+++ b/repo
-@@ -236,6 +236,7 @@ import optparse
- import re
- import shutil
- import stat
-+import ssl
-
- if sys.version_info[0] == 3:
- import urllib.request