matrix-authentication-service: 1.17.0 -> 1.20.0 (#540763)
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
fetchNpmDeps,
|
||||
npmHooks,
|
||||
fetchPnpmDeps,
|
||||
pnpm,
|
||||
pnpmConfigHook,
|
||||
nodejs,
|
||||
python3,
|
||||
pkg-config,
|
||||
@@ -19,30 +20,30 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "matrix-authentication-service";
|
||||
version = "1.17.0";
|
||||
version = "1.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "element-hq";
|
||||
repo = "matrix-authentication-service";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-/3NgMZ0B+B0BHPBi/vuiCS6xi70wgNKCZH0hTpkWi+U=";
|
||||
hash = "sha256-0fvGhBxwXhSzWvNhflreEFoCBycM10vMkMf4sj95vfY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-aZSnQmOwqo0OG3XXM5eups0cKNs80j/nAsZB5tnWUrY=";
|
||||
cargoHash = "sha256-3V50qNvg24WZvQ9z7IZJAnPXHTibZ6o3EzUoinLU6Gw=";
|
||||
|
||||
npmDeps = fetchNpmDeps {
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
||||
src = "${finalAttrs.src}/${finalAttrs.npmRoot}";
|
||||
hash = "sha256-FevzqirT/GyT8urQ79AtJi+q1zcwn73AyiJTf/B9cG0=";
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
fetcherVersion = 4;
|
||||
hash = "sha256-j2A2VCKQPfoyrNDtazu8hzUHpS130Ju/Cy3yfu9tC5I=";
|
||||
};
|
||||
|
||||
npmRoot = "frontend";
|
||||
npmFlags = [ "--legacy-peer-deps" ];
|
||||
pnpmRoot = "frontend";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
open-policy-agent
|
||||
npmHooks.npmConfigHook
|
||||
pnpmConfigHook
|
||||
pnpm
|
||||
nodejs
|
||||
(python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp
|
||||
]
|
||||
@@ -82,7 +83,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
in
|
||||
''
|
||||
make -C policies
|
||||
(cd "$npmRoot" && npm run build)
|
||||
(cd "$pnpmRoot" && npm run build)
|
||||
|
||||
# Fix aws-lc-sys cross-compilation
|
||||
export CC_${buildTargetUnderscore}=$CC_FOR_BUILD
|
||||
@@ -92,8 +93,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
# Adapted from https://github.com/element-hq/matrix-authentication-service/blob/v0.20.0/.github/workflows/build.yaml#L75-L84
|
||||
postInstall = ''
|
||||
install -Dm444 -t "$out/share/$pname" "policies/policy.wasm"
|
||||
install -Dm444 -t "$out/share/$pname" "$npmRoot/dist/manifest.json"
|
||||
install -Dm444 -t "$out/share/$pname/assets" "$npmRoot/dist/"*
|
||||
install -Dm444 -t "$out/share/$pname" "$pnpmRoot/dist/manifest.json"
|
||||
install -Dm444 -t "$out/share/$pname/assets" "$pnpmRoot/dist/"*
|
||||
cp -r templates "$out/share/$pname/templates"
|
||||
cp -r translations "$out/share/$pname/translations"
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user