mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
forgejo,forgejo-lts: fix passthru.updateScript
`nix-update` is unable to detect that the hashes are in `packages.nix` and `lts.nix` instead of `generic.nix` (where the `.src` attribute lies) respectively. `nix-update` provides a `--override-filename` flag to override that heuristic, so we use that. Additionally, scope `lts.nix` to the 7.x version series by using `--version-regex`.
This commit is contained in:
parent
0c4a828b0d
commit
31d5838761
@ -3,6 +3,7 @@
|
||||
, hash
|
||||
, npmDepsHash
|
||||
, vendorHash
|
||||
, nixUpdateExtraArgs ? [ ]
|
||||
}:
|
||||
|
||||
{ bash
|
||||
@ -154,7 +155,7 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
tests = if lts then nixosTests.forgejo-lts else nixosTests.forgejo;
|
||||
updateScript = nix-update-script { };
|
||||
updateScript = nix-update-script { extraArgs = nixUpdateExtraArgs; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
@ -4,4 +4,10 @@ import ./generic.nix {
|
||||
npmDepsHash = "sha256-OqtYRjftwGxgW1JgMxyWd+9DndpEkd3LdQHSECc40yU=";
|
||||
vendorHash = "sha256-hfbNyCQMQzDzJxFc2MPAR4+v/qNcnORiQNbwbbIA4Nw=";
|
||||
lts = true;
|
||||
nixUpdateExtraArgs = [
|
||||
"--version-regex"
|
||||
"v(7\.[0-9.]+)"
|
||||
"--override-filename"
|
||||
"pkgs/by-name/fo/forgejo/lts.nix"
|
||||
];
|
||||
}
|
||||
|
@ -4,4 +4,8 @@ import ./generic.nix {
|
||||
npmDepsHash = "sha256-6AMaZadgcTvOBsIXJjZQB6Q1rkdn+R82pclXdVvtdWY=";
|
||||
vendorHash = "sha256-tNb0tCf+gjUmUqrjkzt7Wqqz21hW9WRh8CEdX8rv8Do=";
|
||||
lts = false;
|
||||
nixUpdateExtraArgs = [
|
||||
"--override-filename"
|
||||
"pkgs/by-name/fo/forgejo/package.nix"
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user