Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
at main 3.0 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 targets.aarch64-unknown-linux-gnu.latest.rust-std 23 ]; 24 # configure crates 25 nci.crates."wisp-cli" = { 26 profiles = { 27 dev.runTests = false; 28 release.runTests = false; 29 }; 30 targets."x86_64-unknown-linux-gnu" = let 31 targetPkgs = pkgs.pkgsCross.gnu64; 32 targetCC = targetPkgs.stdenv.cc; 33 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 34 in rec { 35 default = true; 36 depsDrvConfig.mkDerivation = { 37 nativeBuildInputs = [targetCC]; 38 }; 39 depsDrvConfig.env = rec { 40 TARGET_CC = "${targetCC.targetPrefix}cc"; 41 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 42 }; 43 drvConfig = depsDrvConfig; 44 }; 45 targets."x86_64-pc-windows-gnu" = let 46 targetPkgs = pkgs.pkgsCross.mingwW64; 47 targetCC = targetPkgs.stdenv.cc; 48 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 49 in rec { 50 depsDrvConfig.mkDerivation = { 51 nativeBuildInputs = [targetCC]; 52 buildInputs = with targetPkgs; [windows.pthreads]; 53 }; 54 depsDrvConfig.env = rec { 55 TARGET_CC = "${targetCC.targetPrefix}cc"; 56 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 57 }; 58 drvConfig = depsDrvConfig; 59 }; 60 targets."aarch64-apple-darwin" = let 61 targetPkgs = pkgs.pkgsCross.aarch64-darwin; 62 targetCC = targetPkgs.stdenv.cc; 63 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 64 in rec { 65 depsDrvConfig.mkDerivation = { 66 nativeBuildInputs = [targetCC]; 67 }; 68 depsDrvConfig.env = rec { 69 TARGET_CC = "${targetCC.targetPrefix}cc"; 70 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 71 }; 72 drvConfig = depsDrvConfig; 73 }; 74 targets."aarch64-unknown-linux-gnu" = let 75 targetPkgs = pkgs.pkgsCross.aarch64-multiplatform; 76 targetCC = targetPkgs.stdenv.cc; 77 targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 78 in rec { 79 depsDrvConfig.mkDerivation = { 80 nativeBuildInputs = [targetCC]; 81 }; 82 depsDrvConfig.env = rec { 83 TARGET_CC = "${targetCC.targetPrefix}cc"; 84 "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 85 }; 86 drvConfig = depsDrvConfig; 87 }; 88 }; 89 }; 90}