rauthy: 0.34.3 -> 0.35.1 (#509512)

This commit is contained in:
Michael Daniels
2026-04-26 03:16:29 +00:00
committed by GitHub
2 changed files with 35 additions and 105 deletions
@@ -1,15 +0,0 @@
diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js
index 397fe4d4..3a08f7a2 100644
--- a/frontend/svelte.config.js
+++ b/frontend/svelte.config.js
@@ -12,8 +12,8 @@ const config = {
},
adapter: adapter({
fallback: null,
- pages: '../templates/html',
- assets: '../static/v1',
+ pages: 'dist/templates/html',
+ assets: 'dist/static/v1',
precompress: true,
strict: true,
}),
+35 -90
View File
@@ -1,122 +1,65 @@
{
lib,
fetchFromGitHub,
fetchNpmDeps,
rustPlatform,
buildNpmPackage,
npmHooks,
nodejs,
nix-update-script,
writableTmpDirAsHomeHook,
pkg-config,
perl,
wasm-pack,
wasm-bindgen-cli_0_2_108,
wasm-bindgen-cli_0_2_118,
binaryen,
lld,
rust-jemalloc-sys-unprefixed,
}:
let
version = "0.34.3";
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rauthy";
version = "0.35.1";
src = fetchFromGitHub {
owner = "sebadob";
repo = "rauthy";
tag = "v${version}";
hash = "sha256-ey6y/EGmz/80s0nbxsk6li9KCJV5IAtBp5QqAj7a6R0=";
tag = "v${finalAttrs.version}";
hash = "sha256-m9MRKBoRbHSXgK1nsxoI1laY2pDybnSaTeihKy6+1AU=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src pname version;
hash = "sha256-mkIHup/6aA9QDPlekhdZiXWryhetsJMxl3HAXsabACQ=";
};
# Wasm modules are needed to build the frontend and are part of the main Rust repo.
#
# We use rustPlatform.buildRustPackage to get the correct environment for wasm-pack.
# Since the "wasm-modules" crate has no binary output, cargoInstallPostBuildHook fails,
# so we disable the cargo install phase.
wasmModules = rustPlatform.buildRustPackage {
inherit version src cargoDeps;
pname = "${pname}-wasm-modules";
nativeBuildInputs = [
writableTmpDirAsHomeHook
wasm-pack
wasm-bindgen-cli_0_2_108
binaryen
lld
];
buildPhase = ''
runHook preBuild
mkdir -p $out/wasm
cd src/wasm-modules
wasm-pack -v build --out-dir $out/wasm/spow --no-pack --out-name spow --features spow
wasm-pack -v build --out-dir $out/wasm/md --no-pack --out-name md --features md
runHook postBuild
'';
dontCargoInstall = true;
# Skip checks here; they will run in the main package.
doCheck = false;
};
frontend = buildNpmPackage {
inherit version src;
pname = "${pname}-frontend";
sourceRoot = "${src.name}/frontend";
patches = [
./0001-build-svelte-files-inside-the-current-directory.patch
];
patchFlags = [
"-p2"
];
npmDepsHash = "sha256-N/tFwQNWMudFtetIKfirXDvWH3CfRwjdpBcxkXZsVig=";
preBuild = ''
mkdir -p ./src/wasm/
cp -r ${wasmModules}/wasm/* ./src/wasm/
'';
};
in
rustPlatform.buildRustPackage (finalAttrs: {
inherit
pname
version
src
cargoDeps
;
nativeBuildInputs = [
pkg-config
binaryen
lld
nodejs
npmHooks.npmConfigHook
perl
wasm-bindgen-cli_0_2_118
wasm-pack
];
buildInputs = [ rust-jemalloc-sys-unprefixed ];
npmRoot = "frontend";
npmDeps = fetchNpmDeps {
src = "${finalAttrs.src}/frontend";
hash = "sha256-MVfon/jKtXfgm6YBkeNx3CGloR7bzqgExUckoLMW8B4=";
};
cargoHash = "sha256-GHU1vCSAf3SUaqTpymQzQqX3FSVNvJtYD3Av4Dsm+Rc=";
preBuild = ''
cp -r ${frontend}/lib/node_modules/frontend/dist/templates/html/ templates/html
cp -r ${frontend}/lib/node_modules/frontend/dist/static/ static
pushd src/wasm-modules
wasm-pack build -d ../../frontend/src/wasm/spow --no-pack --out-name spow --features spow
wasm-pack build -d ../../frontend/src/wasm/md --no-pack --out-name md --features md
popd
pushd "$npmRoot"
npm run build
popd
'';
# Tests fail and appear unmaintained upstream.
doCheck = false;
passthru = {
inherit frontend;
updateScript = nix-update-script {
extraArgs = [
"--subpackage=frontend"
];
};
updateScript = nix-update-script { };
};
meta = {
@@ -125,7 +68,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
homepage = "https://github.com/sebadob/rauthy";
changelog = "https://github.com/sebadob/rauthy/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ angelodlfrtr ];
maintainers = with lib.maintainers; [
angelodlfrtr
ungeskriptet
];
};
})