{ ranger, den-http-get-updater, fetchFromGitHub, fetchpatch, lib, python3Packages, }: ranger.overrideAttrs (selfAttrs: superAttrs: { pname = "ranger"; version = "0-unsatble-git-${lib.substring 0 7 selfAttrs.src.rev}"; name = "${selfAttrs.pname}-${selfAttrs.version}"; src = fetchFromGitHub { owner = "ranger"; repo = "ranger"; rev = "b00f923911090204139c9e19ba42e9d80aa0889f"; hash = "sha256-uMvo+5I5WCJGT5+XRS/NFClDGH4F59ogQJb+RYuraX4="; }; patches = superAttrs.patches or [] ++ [ (fetchpatch { url = "https://github.com/ranger/ranger/commit/c6bd9e051e8429fb8dcf16acf6ae9d34f14ecb24.patch"; hash = "sha256-NOGL51Ctv0Rmo+lbUY8awimo/9K007mPfRUnYBihRNQ="; }) ]; propagatedBuildInputs = with python3Packages; [ # required for test suite, it's being ran during package build for some reason flake8 pylint pytest setuptools ] ++ 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"; }; }]; }; }; })