17 rustPlatform.buildRustPackage rec {
21 src = fetchFromGitHub {
22 owner = "stalwartlabs";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-kMfdCb2dwoVd9G1uZw2wcfaAAPt6obFfWQbbXG/MDB4=";
28 npmDeps = fetchNpmDeps {
30 name = "${pname}-npm-deps";
31 hash = "sha256-na1HEueX8w7kuDp8LEtJ0nD1Yv39cyk6sEMpS1zix2s=";
34 cargoHash = "sha256-0Urr0MsmenFqg25lZAzg7LgJ/NkZHINoOWtPad7G6GE=";
37 # Using local tailwindcss for compilation
38 substituteInPlace Trunk.toml --replace-fail "npx tailwindcss" "tailwindcss"
43 llvmPackages.bintools-unwrapped
45 npmHooks.npmConfigHook
48 # needs to match with wasm-bindgen version in upstreams Cargo.lock
49 (wasm-bindgen-cli.override {
51 hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
52 cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
57 NODE_PATH = "$npmDeps";
60 trunk build --offline --frozen --release
66 zip -r $out/webadmin.zip *
70 updateScript = nix-update-script { };
74 description = "Secure & modern all-in-one mail server Stalwart (webadmin module)";
75 homepage = "https://github.com/stalwartlabs/webadmin";
76 changelog = "https://github.com/stalwartlabs/mail-server/blob/${version}/CHANGELOG";
77 license = licenses.agpl3Only;
78 maintainers = with maintainers; [ onny ];