diff --git a/pkgs/by-name/fo/forgejo/generic.nix b/pkgs/by-name/fo/forgejo/generic.nix index 4f6d7769249f..080789bec45e 100644 --- a/pkgs/by-name/fo/forgejo/generic.nix +++ b/pkgs/by-name/fo/forgejo/generic.nix @@ -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 = { diff --git a/pkgs/by-name/fo/forgejo/lts.nix b/pkgs/by-name/fo/forgejo/lts.nix index 5244a3bcd82e..5db327d51b02 100644 --- a/pkgs/by-name/fo/forgejo/lts.nix +++ b/pkgs/by-name/fo/forgejo/lts.nix @@ -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" + ]; } diff --git a/pkgs/by-name/fo/forgejo/package.nix b/pkgs/by-name/fo/forgejo/package.nix index 99d51617ff04..8ca93b3b9865 100644 --- a/pkgs/by-name/fo/forgejo/package.nix +++ b/pkgs/by-name/fo/forgejo/package.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" + ]; }