fosrl-pangolin: Allow edition to be specified
Currently the only way to override which "set" is installed is by replacing strings in the buildPhase with overrideAttrs. This way seems a bit cleaner, certainly easier and more obvious.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
makeWrapper,
|
||||
formats,
|
||||
databaseType ? "sqlite",
|
||||
edition ? "oss",
|
||||
environmentVariables ? { },
|
||||
nixosTests,
|
||||
}:
|
||||
@@ -15,6 +16,12 @@ assert lib.assertOneOf "databaseType" databaseType [
|
||||
"pg"
|
||||
];
|
||||
|
||||
assert lib.assertOneOf "edition" edition [
|
||||
"enterprise"
|
||||
"oss"
|
||||
"saas"
|
||||
];
|
||||
|
||||
let
|
||||
db =
|
||||
isLong:
|
||||
@@ -57,7 +64,7 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
preBuild = ''
|
||||
npm run set:${db false}
|
||||
npm run set:oss
|
||||
npm run set:${edition}
|
||||
npm run db:generate
|
||||
'';
|
||||
|
||||
@@ -160,7 +167,7 @@ buildNpmPackage (finalAttrs: {
|
||||
description = "Tunneled reverse proxy server with identity and access control";
|
||||
homepage = "https://github.com/fosrl/pangolin";
|
||||
changelog = "https://github.com/fosrl/pangolin/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.agpl3Only;
|
||||
license = [ lib.licenses.agpl3Only ] ++ lib.optional (edition != "oss") lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [
|
||||
jackr
|
||||
water-sucks
|
||||
|
||||
Reference in New Issue
Block a user