973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 1 | { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 2 | description = "Malice: a hosted Matrix client backed by macltok"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 3 | |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 4 | inputs = { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 6 | fenix = { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 7 | url = "github:nix-community/fenix"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 8 | inputs.nixpkgs.follows = "nixpkgs"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 9 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 10 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 11 | |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 12 | outputs = |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 13 | { self, nixpkgs, fenix }: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 14 | let |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 15 | systems = [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 16 | "x86_64-linux" |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 17 | "aarch64-linux" |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 18 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 19 | forAllSystems = nixpkgs.lib.genAttrs systems; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 20 | workerLock = builtins.fromTOML (builtins.readFile ./crates/malice-worker/Cargo.lock); |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 21 | lockedVersion = |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 22 | name: (nixpkgs.lib.findFirst (p: p.name == name) null workerLock.package).version; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 23 | # wasm-bindgen-test-runner refuses a module built by any other wasm-bindgen version |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 24 | wasmBindgenCli = |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 25 | pkgs: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 26 | pkgs.buildWasmBindgenCli rec { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 27 | src = pkgs.fetchCrate { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 28 | pname = "wasm-bindgen-cli"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 29 | version = lockedVersion "wasm-bindgen"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 30 | hash = "sha256-a7lcXJnnZkYReja+iUO7NqqrWyv3toxnUgQb8s4IS5s="; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 31 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 32 | cargoDeps = pkgs.rustPlatform.fetchCargoVendor { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 33 | inherit src; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 34 | inherit (src) pname version; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 35 | hash = "sha256-R1Tas33Ursy8kqsxguAkG0ZhNed2n5uFTAhw1l2qlLY="; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 36 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 37 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 38 | wasmToolchain = |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 39 | system: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 40 | let |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 41 | toolchains = fenix.packages.${system}; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 42 | in |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 43 | toolchains.combine [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 44 | toolchains.stable.cargo |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 45 | toolchains.stable.clippy |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 46 | toolchains.stable.rustc |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 47 | toolchains.stable.rustfmt |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 48 | toolchains.stable.rust-src |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 49 | toolchains.targets.wasm32-unknown-unknown.stable.rust-std |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 50 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 51 | in |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 52 | { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 53 | packages = forAllSystems ( |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 54 | system: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 55 | let |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 56 | pkgs = nixpkgs.legacyPackages.${system}; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 57 | wasmPlatform = pkgs.makeRustPlatform { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 58 | cargo = wasmToolchain system; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 59 | rustc = wasmToolchain system; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 60 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 61 | web = pkgs.buildNpmPackage { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 62 | pname = "malice-web"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 63 | version = "0.1.0"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 64 | src = ./web; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 65 | npmDepsHash = "sha256-Q00XwHH/+kfZTAPBKUlkx3hAtYvSpDw2opj22nGTIMY="; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 66 | installPhase = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 67 | runHook preInstall |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 68 | mkdir -p $out/share/malice |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 69 | cp -R dist/. $out/share/malice/ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 70 | runHook postInstall |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 71 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 72 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 73 | backend = pkgs.rustPlatform.buildRustPackage { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 74 | pname = "malice-server"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 75 | version = "0.1.0"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 76 | src = ./.; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 77 | cargoLock.lockFile = ./Cargo.lock; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 78 | nativeBuildInputs = [ pkgs.pkg-config ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 79 | buildInputs = [ pkgs.sqlite ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 80 | # preBuild = "export NIX_BUILD_CORES=2"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 81 | preCheck = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 82 | cargo build --release --bin malice --target ${pkgs.stdenv.hostPlatform.rust.rustcTarget} --offline --locked |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 83 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 84 | SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 85 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 86 | server = pkgs.symlinkJoin { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 87 | name = "malice"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 88 | paths = [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 89 | backend |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 90 | web |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 91 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 92 | nativeBuildInputs = [ pkgs.makeWrapper ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 93 | postBuild = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 94 | wrapProgram $out/bin/malice --set MALICE_WEB_DIR ${web}/share/malice |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 95 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 96 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 97 | # the wasm-bindgen `--target web` glue for malice-worker's `Host`, consumed by |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 98 | # web/src/worker/pkg (gitignored, worker-web's TS imports it as ./pkg/malice_worker.js) |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 99 | workerWasm = wasmPlatform.buildRustPackage { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 100 | pname = "malice-worker-wasm"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 101 | version = "0.1.0"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 102 | src = self; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 103 | cargoRoot = "crates/malice-worker"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 104 | cargoLock.lockFile = ./crates/malice-worker/Cargo.lock; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 105 | nativeBuildInputs = [ (wasmBindgenCli pkgs) ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 106 | buildPhase = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 107 | runHook preBuild |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 108 | cd crates/malice-worker |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 109 | cargo build --offline --frozen --release --lib --target wasm32-unknown-unknown |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 110 | mkdir -p $out |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 111 | wasm-bindgen --target web --out-dir $out --out-name malice_worker \ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 112 | target/wasm32-unknown-unknown/release/malice_worker.wasm |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 113 | runHook postBuild |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 114 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 115 | doCheck = false; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 116 | installPhase = "true"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 117 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 118 | web-device = pkgs.buildNpmPackage { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 119 | pname = "malice-web-device"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 120 | version = "0.1.0"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 121 | src = ./web; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 122 | npmDepsHash = "sha256-Q00XwHH/+kfZTAPBKUlkx3hAtYvSpDw2opj22nGTIMY="; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 123 | postPatch = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 124 | mkdir -p src/worker/pkg |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 125 | cp -R ${workerWasm}/. src/worker/pkg/ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 126 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 127 | npmBuildScript = "build:device"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 128 | installPhase = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 129 | runHook preInstall |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 130 | mkdir -p $out/share/malice |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 131 | cp -R dist-device/. $out/share/malice/ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 132 | runHook postInstall |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 133 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 134 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 135 | local = pkgs.symlinkJoin { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 136 | name = "malice-local"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 137 | paths = [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 138 | backend |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 139 | web-device |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 140 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 141 | nativeBuildInputs = [ pkgs.makeWrapper ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 142 | postBuild = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 143 | wrapProgram $out/bin/malice \ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 144 | --set MALICE_WEB_DIR ${web-device}/share/malice \ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 145 | --set MALICE_STATIC_ONLY 1 |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 146 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 147 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 148 | in |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 149 | { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 150 | inherit web server web-device local; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 151 | default = server; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 152 | } |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 153 | ); |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 154 | |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 155 | devShells = forAllSystems ( |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 156 | system: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 157 | let |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 158 | pkgs = nixpkgs.legacyPackages.${system}; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 159 | in |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 160 | { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 161 | default = pkgs.mkShell { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 162 | packages = [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 163 | (wasmToolchain system) |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 164 | (wasmBindgenCli pkgs) |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 165 | pkgs.rust-analyzer |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 166 | pkgs.nodejs_22 |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 167 | pkgs.pkg-config |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 168 | pkgs.sqlite |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 169 | pkgs.firefox |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 170 | pkgs.geckodriver |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 171 | pkgs.matrix-continuwuity |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 172 | pkgs.nushell |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 173 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 174 | # fenix's rustc links through its bundled rust-lld, which skips nix's ld-wrapper and so |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 175 | # the store rpaths, leaving the native server unable to find libsqlite3 at run time |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 176 | "CARGO_TARGET_${nixpkgs.lib.toUpper (builtins.replaceStrings [ "-" ] [ "_" ] pkgs.stdenv.hostPlatform.config)}_RUSTFLAGS" = |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 177 | "-C linker-features=-lld"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 178 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 179 | } |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 180 | ); |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 181 | |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 182 | nixosModules.malice = import ./nix/module.nix { inherit self; }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 183 | nixosModules.default = self.nixosModules.malice; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 184 | checks = forAllSystems ( |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 185 | system: |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 186 | let |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 187 | pkgs = nixpkgs.legacyPackages.${system}; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 188 | wasmPlatform = pkgs.makeRustPlatform { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 189 | cargo = wasmToolchain system; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 190 | rustc = wasmToolchain system; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 191 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 192 | # continuwuity refuses to start without /etc/resolv.conf, which the build sandbox lacks, or with |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 193 | # stdenv's deliberately bogus SSL_CERT_FILE. no exec, run.nu launches through a shell that exits at |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 194 | # once and would trip --die-with-parent, so this shell stays as the parent run.nu kills |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 195 | sandboxedHomeserver = pkgs.writeShellScriptBin "conduwuit" '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 196 | export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 197 | ${pkgs.lib.getExe pkgs.bubblewrap} --die-with-parent --dev-bind / / --tmpfs /etc \ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 198 | --ro-bind ${pkgs.writeText "resolv.conf" "nameserver 127.0.0.1\n"} /etc/resolv.conf \ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 199 | ${pkgs.lib.getExe' pkgs.matrix-continuwuity "conduwuit"} "$@" |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 200 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 201 | in |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 202 | { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 203 | default = self.packages.${system}.default; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 204 | worker-wasm = self.packages.${system}.web-device; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 205 | worker-browser = wasmPlatform.buildRustPackage { |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 206 | pname = "malice-worker-browser-check"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 207 | version = "0.1.0"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 208 | src = self; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 209 | cargoRoot = "crates/malice-worker"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 210 | cargoLock.lockFile = ./crates/malice-worker/Cargo.lock; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 211 | nativeBuildInputs = [ |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 212 | (wasmBindgenCli pkgs) |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 213 | pkgs.firefox |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 214 | pkgs.geckodriver |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 215 | sandboxedHomeserver |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 216 | pkgs.nushell |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 217 | ]; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 218 | buildPhase = '' |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 219 | runHook preBuild |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 220 | export HOME=$TMPDIR |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 221 | nu --no-config-file crates/malice-worker/run.nu |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 222 | runHook postBuild |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 223 | ''; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 224 | doCheck = false; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 225 | installPhase = "touch $out"; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 226 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 227 | } |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 228 | ); |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 229 | }; |
973f8fbdaf80 | atagen | 2026-09-28 09:10 UTC | 230 | } |