Merge pull request #105780 from SuperSandro2000/nix-update-source-test

nix-update-source: switch to pname, version
This commit is contained in:
Raghav Sood 2020-12-03 16:46:25 +00:00 committed by GitHub
commit 92b794c9ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,20 @@
{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts { lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts, runtimeShell }:
, runtimeShell }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "nix-update-source";
version = "0.6.3"; version = "0.6.3";
name = "nix-update-source-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "timbertson"; owner = "timbertson";
repo = "nix-update-source"; repo = "nix-update-source";
rev = "version-0.6.3"; rev = "version-${version}";
sha256 = "157wvv9vnaszzwbj68jpdc0imcm1hdab3z760bx2axbsgfpqqilz"; sha256 = "157wvv9vnaszzwbj68jpdc0imcm1hdab3z760bx2axbsgfpqqilz";
}; };
propagatedBuildInputs = [ nix-prefetch-scripts ]; propagatedBuildInputs = [ nix-prefetch-scripts ];
doCheck = false;
passthru = { passthru = {
# NOTE: `fetch` should not be used within nixpkgs because it # NOTE: `fetch` should not be used within nixpkgs because it
# uses a non-idiomatic structure. It is provided for use by # uses a non-idiomatic structure. It is provided for use by
@ -28,6 +33,7 @@ python3Packages.buildPythonApplication rec {
inherit src; inherit src;
overrideSrc = drv: lib.overrideDerivation drv (orig: { inherit src; }); overrideSrc = drv: lib.overrideDerivation drv (orig: { inherit src; });
}; };
updateScript = '' updateScript = ''
#!${runtimeShell} #!${runtimeShell}
set -e set -e
@ -43,6 +49,7 @@ python3Packages.buildPythonApplication rec {
--modify-nix default.nix --modify-nix default.nix
''; '';
}; };
meta = { meta = {
description = "Utility to automate updating of nix derivation sources"; description = "Utility to automate updating of nix derivation sources";
maintainers = with lib.maintainers; [ timbertson ]; maintainers = with lib.maintainers; [ timbertson ];