mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
forgejo: refactor to support multiple versions
This commit is contained in:
parent
f3bffa8c62
commit
a2e9da2c40
@ -1,3 +1,10 @@
|
||||
{ lts ? false
|
||||
, version
|
||||
, hash
|
||||
, npmDepsHash
|
||||
, vendorHash
|
||||
}:
|
||||
|
||||
{ bash
|
||||
, brotli
|
||||
, buildGoModule
|
||||
@ -20,11 +27,17 @@
|
||||
}:
|
||||
|
||||
let
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "forgejo";
|
||||
repo = "forgejo";
|
||||
rev = "v${version}";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
frontend = buildNpmPackage {
|
||||
pname = "forgejo-frontend";
|
||||
inherit (forgejo) src version;
|
||||
|
||||
npmDepsHash = "sha256-Nu9aOjJpEAuCWWnJfZXy/GayiUDiyc3hOu6Bx7GxfxA=";
|
||||
inherit src version npmDepsHash;
|
||||
|
||||
patches = [
|
||||
./package-json-npm-build-frontend.patch
|
||||
@ -38,18 +51,13 @@ let
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "forgejo";
|
||||
version = "7.0.5";
|
||||
pname = "forgejo" + lib.optionalString lts "-lts";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "forgejo";
|
||||
repo = "forgejo";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Y/Ita5dr3COACffAIAjcqHHcdKiUWWEb/f/MPzMG200=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-hfbNyCQMQzDzJxFc2MPAR4+v/qNcnORiQNbwbbIA4Nw=";
|
||||
inherit
|
||||
version
|
||||
src
|
||||
vendorHash
|
||||
;
|
||||
|
||||
subPackages = [ "." "contrib/environment-to-ini" ];
|
||||
|
||||
|
7
pkgs/by-name/fo/forgejo/package.nix
Normal file
7
pkgs/by-name/fo/forgejo/package.nix
Normal file
@ -0,0 +1,7 @@
|
||||
import ./generic.nix {
|
||||
version = "7.0.5";
|
||||
hash = "sha256-Y/Ita5dr3COACffAIAjcqHHcdKiUWWEb/f/MPzMG200=";
|
||||
npmDepsHash = "sha256-Nu9aOjJpEAuCWWnJfZXy/GayiUDiyc3hOu6Bx7GxfxA=";
|
||||
vendorHash = "sha256-hfbNyCQMQzDzJxFc2MPAR4+v/qNcnORiQNbwbbIA4Nw=";
|
||||
lts = false;
|
||||
}
|
@ -2193,8 +2193,6 @@ with pkgs;
|
||||
|
||||
diff-so-fancy = callPackage ../applications/version-management/diff-so-fancy { };
|
||||
|
||||
forgejo = callPackage ../by-name/fo/forgejo/generic.nix { };
|
||||
|
||||
gex = callPackage ../applications/version-management/gex {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user