3
0
Fork 0
forked from mirrors/nixpkgs

nix-pin: add passthru.updateScript

This commit is contained in:
Tim Cuthbertson 2018-04-22 11:31:41 +10:00
parent 92f083af23
commit 146dabd4ac

View file

@ -20,6 +20,19 @@ let self = stdenv.mkDerivation rec {
let api = import "${self}/share/nix/api.nix" { inherit pkgs; }; in
{
inherit (api) augmentedPkgs pins callPackage;
updateScript = ''
set -e
echo
cd ${toString ./.}
${pkgs.nix-update-source}/bin/nix-update-source \
--prompt version \
--replace-attr version \
--set owner timbertson \
--set repo nix-pin \
--set type fetchFromGitHub \
--set rev 'version-{version}' \
--modify-nix default.nix
'';
};
meta = with stdenv.lib; {
homepage = "https://github.com/timbertson/nix-pin";