From 014ccdefcc465b8cb8e340b263b7dbafed7dee83 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Thu, 7 Nov 2024 14:21:06 +0800 Subject: [PATCH] overlays: bump ocis --- overlays/pkgs/ocis/package.nix | 85 ++++++++++++++++++++++++++++++++++ overlays/pkgs/ocis/web.nix | 2 +- 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 overlays/pkgs/ocis/package.nix diff --git a/overlays/pkgs/ocis/package.nix b/overlays/pkgs/ocis/package.nix new file mode 100644 index 0000000..5ead795 --- /dev/null +++ b/overlays/pkgs/ocis/package.nix @@ -0,0 +1,85 @@ +{ + lib, + stdenvNoCC, + callPackage, + fetchFromGitHub, + buildGoModule, + gnumake, + pnpm, + nodejs, +}: +let + web = callPackage ./web.nix { }; + idp-assets = stdenvNoCC.mkDerivation { + pname = "idp-assets"; + version = "0-unstable-2020-10-14"; + src = fetchFromGitHub { + owner = "owncloud"; + repo = "assets"; + rev = "e8b6aeadbcee1865b9df682e9bd78083842d2b5c"; + hash = "sha256-PzGff2Zx8xmvPYQa4lS4yz2h+y/lerKvUZkYI7XvAUw="; + }; + installPhase = '' + mkdir -p $out/share + cp logo.svg favicon.ico $out/share/ + ''; + dontConfigure = true; + dontBuild = true; + dontFixup = true; + }; +in +buildGoModule rec { + pname = "ocis"; + version = "v5.0.7"; + + vendorHash = null; + + src = fetchFromGitHub { + owner = "owncloud"; + repo = "ocis"; + rev = version; + hash = "sha256-vCEr7UCGEPm0x04U8DpsUNz9c64ZSEIK4SDcitCIDCw="; + }; + + nativeBuildInputs = [ + gnumake + nodejs + pnpm.configHook + ]; + + pnpmDeps = pnpm.fetchDeps { + inherit pname version src; + sourceRoot = "${src.name}/services/idp"; + hash = "sha256-gNlN+u/bobnTsXrsOmkDcWs67D/trH3inT5AVQs3Brs="; + }; + pnpmRoot = "services/idp"; + + buildPhase = '' + runHook preBuild + cp -r ${web}/share/* services/web/assets/ + pnpm -C services/idp build + + mkdir -p services/idp/assets/identifier/static + cp -r ${idp-assets}/share/* services/idp/assets/identifier/static/ + + make -C ocis VERSION=${version} DATE=${version} build + runHook postBuild + ''; + + installPhase = '' + mkdir -p $out/bin/ + cp ocis/bin/ocis $out/bin/ + ''; + + passthru = { + inherit web; + }; + + meta = with lib; { + homepage = "https://github.com/owncloud/ocis"; + description = "ownCloud Infinite Scale Stack"; + mainProgram = "ocis"; + license = licenses.asl20; + maintainers = with maintainers; [ xinyangli ]; + }; +} diff --git a/overlays/pkgs/ocis/web.nix b/overlays/pkgs/ocis/web.nix index d28340c..1b44901 100644 --- a/overlays/pkgs/ocis/web.nix +++ b/overlays/pkgs/ocis/web.nix @@ -31,7 +31,7 @@ stdenvNoCC.mkDerivation rec { pnpmDeps = pnpm.fetchDeps { inherit pname version src; - hash = "sha256-m6yGqUmDor5273JsAlKs52Ug+bc3uhpI8F+MUhULAh4="; + hash = "sha256-3Erva6srdkX1YQ727trx34Ufx524nz19MUyaDQToz6M="; }; meta = with lib; {