nvfetcher
nvfetcher copied to clipboard
`src.prefix` strips both `version` and `rev` and fails the fetch
I'm using src.prefix to strip tags like v1.6.10 to get version number 1.6.10.
[swaylock-effects]
src.github_tag = "jirutka/swaylock-effects"
src.prefix = "v"
fetch.github = "jirutka/swaylock-effects"
But it actually strip both version and rev, which contradicts README.
You can tweak obtained version number using this option, e.g. stripping the prefix
vor transforming the result by regex.
The fetcher will be called as follows:
> fetchFromGitHub {
> owner = "jirutka";
> repo = "swaylock-effects";
> rev = "1.6.10";
> sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
> }
trying https://github.com/jirutka/swaylock-effects/archive/1.6.10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 14 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
This is somewhat by design, because the transformation is done by nvchecker, and nvfetcher uses the processed version in later steps. This should be clarified in README. IMO, for the purpose of changing the version number for simply building the derivation, i.e. without affecting fetching and other processes, it wouldn't be harm to do with some string operations in Nix land.