From ad5b090853d381efcc0e2e7f87eaf364aa4abac6 Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Sun, 22 Apr 2018 11:31:41 +1000 Subject: [PATCH] gup: add `passthru.updateScript` --- .../tools/build-managers/gup/default.nix | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix index 748a59bda2f3..f6d5b7b9b59c 100644 --- a/pkgs/development/tools/build-managers/gup/default.nix +++ b/pkgs/development/tools/build-managers/gup/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, lib, python, which, pychecker ? null }: +{ stdenv, fetchFromGitHub, nix-update-source, lib, python, which, pychecker ? null }: stdenv.mkDerivation rec { version = "0.7.0"; src = fetchFromGitHub { - sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv"; - rev = "version-${version}"; - repo = "gup"; owner = "timbertson"; + repo = "gup"; + rev = "version-0.7.0"; + sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv"; }; name = "gup-${version}"; buildInputs = lib.remove null [ python which pychecker ]; @@ -15,6 +15,19 @@ stdenv.mkDerivation rec { mkdir $out cp -r python/bin $out/bin ''; + passthru.updateScript = '' + set -e + echo + cd ${toString ./.} + ${nix-update-source}/bin/nix-update-source \ + --prompt version \ + --replace-attr version \ + --set owner timbertson \ + --set repo gup \ + --set type fetchFromGitHub \ + --set rev 'version-{version}' \ + --modify-nix default.nix + ''; meta = { inherit (src.meta) homepage; description = "A better make, inspired by djb's redo";