nix-update-source: switch to pname, version

This commit is contained in:
Sandro Jäckel 2020-12-03 11:15:10 +01:00
parent c0a87f4f58
commit de499540ae
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,14 +1,16 @@
{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts
, runtimeShell }:
{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts, runtimeShell }:
python3Packages.buildPythonApplication rec {
pname = "nix-update-source";
version = "0.6.3";
name = "nix-update-source-${version}";
src = fetchFromGitHub {
owner = "timbertson";
repo = "nix-update-source";
rev = "version-0.6.3";
rev = "version-${version}";
sha256 = "157wvv9vnaszzwbj68jpdc0imcm1hdab3z760bx2axbsgfpqqilz";
};
propagatedBuildInputs = [ nix-prefetch-scripts ];
passthru = {
# NOTE: `fetch` should not be used within nixpkgs because it
@ -28,6 +30,7 @@ python3Packages.buildPythonApplication rec {
inherit src;
overrideSrc = drv: lib.overrideDerivation drv (orig: { inherit src; });
};
updateScript = ''
#!${runtimeShell}
set -e
@ -43,6 +46,7 @@ python3Packages.buildPythonApplication rec {
--modify-nix default.nix
'';
};
meta = {
description = "Utility to automate updating of nix derivation sources";
maintainers = with lib.maintainers; [ timbertson ];