pomerium: consolidate ui and base package
This commit is contained in:
parent
2ded6702dc
commit
0b16c98205
4 changed files with 47 additions and 70 deletions
|
@ -1,25 +0,0 @@
|
||||||
{ fetchFromGitHub
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
version = "0.19.0";
|
|
||||||
srcSha256 = "sha256:0s5ji1iywymzxlv89y3ivl5vngkifhbpidpwxdrh969l3c5r4klf";
|
|
||||||
vendorSha256 = "sha256:1p78nb7bryvs7p5iq6ihylflyjia60x4hd9c62ffwz37dwqlbi33";
|
|
||||||
yarnSha256 = "sha256:1n6swanrds9hbd4yyfjzpnfhsb8fzj1pwvvcg3w7b1cgnihclrmv";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "pomerium";
|
|
||||||
repo = "pomerium";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = srcSha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://pomerium.io";
|
|
||||||
description = "Authenticating reverse proxy";
|
|
||||||
license = licenses.asl20;
|
|
||||||
maintainers = with maintainers; [ lukegb ];
|
|
||||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -3,18 +3,52 @@
|
||||||
, callPackage
|
, callPackage
|
||||||
, lib
|
, lib
|
||||||
, envoy
|
, envoy
|
||||||
|
, mkYarnPackage
|
||||||
|
, fetchYarnDeps
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, pomerium-ui
|
|
||||||
, pomerium-cli
|
, pomerium-cli
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) concatStringsSep concatMap id mapAttrsToList;
|
inherit (lib) concatStringsSep concatMap id mapAttrsToList;
|
||||||
common = callPackage ./common.nix { };
|
|
||||||
in
|
in
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
inherit (common) version src vendorSha256 meta;
|
|
||||||
pname = "pomerium";
|
pname = "pomerium";
|
||||||
|
version = "0.19.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pomerium";
|
||||||
|
repo = "pomerium";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256:0s5ji1iywymzxlv89y3ivl5vngkifhbpidpwxdrh969l3c5r4klf";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "sha256:1p78nb7bryvs7p5iq6ihylflyjia60x4hd9c62ffwz37dwqlbi33";
|
||||||
|
|
||||||
|
ui = mkYarnPackage {
|
||||||
|
inherit version;
|
||||||
|
src = "${src}/ui";
|
||||||
|
|
||||||
|
# update pomerium-ui-package.json when updating package, sourced from ui/package.json
|
||||||
|
packageJSON = ./pomerium-ui-package.json;
|
||||||
|
offlineCache = fetchYarnDeps {
|
||||||
|
yarnLock = "${src}/ui/yarn.lock";
|
||||||
|
sha256 = "sha256:1n6swanrds9hbd4yyfjzpnfhsb8fzj1pwvvcg3w7b1cgnihclrmv";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
yarn --offline build
|
||||||
|
runHook postbuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
cp -R deps/pomerium/dist $out
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
doDist = false;
|
||||||
|
};
|
||||||
|
|
||||||
subPackages = [
|
subPackages = [
|
||||||
"cmd/pomerium"
|
"cmd/pomerium"
|
||||||
|
@ -70,7 +104,7 @@ buildGoModule rec {
|
||||||
echo '${envoy.version}' > pkg/envoy/files/envoy.version
|
echo '${envoy.version}' > pkg/envoy/files/envoy.version
|
||||||
|
|
||||||
# put the built UI files where they will be picked up as part of binary build
|
# put the built UI files where they will be picked up as part of binary build
|
||||||
cp -r ${pomerium-ui} ui
|
cp -r ${ui}/* ui/dist
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -81,4 +115,12 @@ buildGoModule rec {
|
||||||
inherit (nixosTests) pomerium;
|
inherit (nixosTests) pomerium;
|
||||||
inherit pomerium-cli;
|
inherit pomerium-cli;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://pomerium.io";
|
||||||
|
description = "Authenticating reverse proxy";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ lukegb ];
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
{ lib
|
|
||||||
, callPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, fetchYarnDeps
|
|
||||||
, mkYarnPackage }:
|
|
||||||
let
|
|
||||||
common = callPackage ./common.nix { };
|
|
||||||
in
|
|
||||||
mkYarnPackage {
|
|
||||||
inherit (common) version;
|
|
||||||
pname = "pomerium-ui";
|
|
||||||
src = "${common.src}/ui";
|
|
||||||
|
|
||||||
# update pomerium-ui-package.json when updating package, sourced from ui/package.json
|
|
||||||
packageJSON = ./pomerium-ui-package.json;
|
|
||||||
offlineCache = fetchYarnDeps {
|
|
||||||
yarnLock = "${common.src}/ui/yarn.lock";
|
|
||||||
sha256 = common.yarnSha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
yarn --offline build
|
|
||||||
runHook postbuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
cp -R deps/pomerium/dist $out
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
doDist = false;
|
|
||||||
|
|
||||||
meta = common.meta // {
|
|
||||||
description = "Pomerium authenticating reverse proxy UI";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -22892,9 +22892,7 @@ with pkgs;
|
||||||
};
|
};
|
||||||
pflogsumm = callPackage ../servers/mail/postfix/pflogsumm.nix { };
|
pflogsumm = callPackage ../servers/mail/postfix/pflogsumm.nix { };
|
||||||
|
|
||||||
pomerium = callPackage ../servers/http/pomerium {
|
pomerium = callPackage ../servers/http/pomerium { };
|
||||||
pomerium-ui = callPackage ../servers/http/pomerium/ui.nix { };
|
|
||||||
};
|
|
||||||
pomerium-cli = callPackage ../tools/security/pomerium-cli { };
|
pomerium-cli = callPackage ../tools/security/pomerium-cli { };
|
||||||
|
|
||||||
postgrey = callPackage ../servers/mail/postgrey { };
|
postgrey = callPackage ../servers/mail/postgrey { };
|
||||||
|
|
Loading…
Reference in a new issue