Monorepo for Wisp.place. A static site hosting service built on top of the AT Protocol.
at main 1.9 kB view raw
1{...}: { 2 perSystem = { 3 pkgs, 4 config, 5 lib, 6 inputs', 7 ... 8 }: { 9 # declare projects 10 nci.projects."wisp-place-cli" = { 11 path = ./cli; 12 export = false; 13 }; 14 nci.toolchains.mkBuild = _: 15 with inputs'.fenix.packages; 16 combine [ 17 minimal.rustc 18 minimal.cargo 19 targets.x86_64-pc-windows-gnu.latest.rust-std 20 targets.x86_64-unknown-linux-gnu.latest.rust-std 21 targets.aarch64-apple-darwin.latest.rust-std 22 ]; 23 # configure crates 24 nci.crates."wisp-cli" = { 25 profiles = { 26 dev.runTests = false; 27 release.runTests = false; 28 }; 29 targets."x86_64-unknown-linux-gnu" = { 30 default = true; 31 }; 32 targets."x86_64-pc-windows-gnu" = let 33 targetPkgs = pkgs.pkgsCross.mingwW64; 34 targetCC = targetPkgs.stdenv.cc; 35 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 36 in rec { 37 depsDrvConfig.mkDerivation = { 38 nativeBuildInputs = [targetCC]; 39 buildInputs = with targetPkgs; [windows.pthreads]; 40 }; 41 depsDrvConfig.env = rec { 42 TARGET_CC = "${targetCC.targetPrefix}cc"; 43 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 44 }; 45 drvConfig = depsDrvConfig; 46 }; 47 targets."aarch64-apple-darwin" = let 48 targetPkgs = pkgs.pkgsCross.aarch64-darwin; 49 targetCC = targetPkgs.stdenv.cc; 50 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 51 in rec { 52 depsDrvConfig.mkDerivation = { 53 nativeBuildInputs = [targetCC]; 54 }; 55 depsDrvConfig.env = rec { 56 TARGET_CC = "${targetCC.targetPrefix}cc"; 57 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 58 }; 59 drvConfig = depsDrvConfig; 60 }; 61 }; 62 }; 63}