pkgs/ranger-git: add updater, update
This commit is contained in:
parent
4e9be713ee
commit
09cd559534
1 changed files with 36 additions and 4 deletions
|
@ -1,18 +1,32 @@
|
||||||
{
|
{
|
||||||
ranger,
|
ranger,
|
||||||
|
|
||||||
|
den-http-get-updater,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
fetchpatch,
|
||||||
|
lib,
|
||||||
python3Packages,
|
python3Packages,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
ranger.overrideAttrs (selfAttrs: superAttrs: {
|
ranger.overrideAttrs (selfAttrs: superAttrs: {
|
||||||
version = "git";
|
pname = "ranger";
|
||||||
|
version = "0-unsatble-git-${lib.substring 0 7 selfAttrs.src.rev}";
|
||||||
|
name = "${selfAttrs.pname}-${selfAttrs.version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ranger";
|
owner = "ranger";
|
||||||
repo = "ranger";
|
repo = "ranger";
|
||||||
rev = "c7777d558d5b69843b21f986e9af1af311c83887";
|
rev = "b31db0f638118c103a35be5a57d1a0f3609838d6";
|
||||||
hash = "sha256-DTVoEfc4dAaBTDLFujvWIYj5KHL89YknUiinIs9Rkeg=";
|
hash = "sha256-ksWlopkqD/98hwVspIRIEGCN/L/OuVlVyXftfza4LhI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = superAttrs.patches or [] ++ [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/ranger/ranger/commit/efb5d0410083ae218996eaa2447d828794229ecf.patch";
|
||||||
|
hash = "sha256-q/3pbnpnCoEoPY76v63OHtGrDQdFQBEZTFG6XNAeJ4w=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
# required for test suite, it's being ran during package build for some reason
|
# required for test suite, it's being ran during package build for some reason
|
||||||
flake8
|
flake8
|
||||||
|
@ -20,4 +34,22 @@ ranger.overrideAttrs (selfAttrs: superAttrs: {
|
||||||
pytest
|
pytest
|
||||||
setuptools
|
setuptools
|
||||||
] ++ superAttrs.propagatedBuildInputs;
|
] ++ superAttrs.propagatedBuildInputs;
|
||||||
|
|
||||||
|
passthru = superAttrs.passthru // {
|
||||||
|
updateScript = den-http-get-updater {
|
||||||
|
fileLocation = builtins.toString ./package.nix;
|
||||||
|
previousVersion = selfAttrs.src.rev;
|
||||||
|
versionUrl = "https://api.github.com/repos/ranger/ranger/commits";
|
||||||
|
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
|
||||||
|
prefetchList = [{
|
||||||
|
unpack = true;
|
||||||
|
previousHash = selfAttrs.src.outputHash;
|
||||||
|
prefetchUrlLocation = {
|
||||||
|
# FIXME: this is ugly
|
||||||
|
file = ../../../../outputs.nix;
|
||||||
|
attrpath = "updateList.packages/ranger-git.src.url";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue