ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
at rollback-hacking 51 lines 1.1 kB view raw
1{ 2 perSystem = 3 { 4 pkgs, 5 lib, 6 craneLib, 7 commonArgs, 8 ... 9 }: 10 { 11 _module.args = { 12 commonArgs = 13 let 14 inherit (lib.fileset) 15 toSource 16 unions 17 ; 18 src = toSource { 19 root = ../.; 20 fileset = unions [ 21 ../.cargo 22 ../.sqlx 23 ../wire 24 ../Cargo.toml 25 ../Cargo.lock 26 ]; 27 }; 28 29 commonArgs = { 30 inherit src; 31 strictDeps = true; 32 WIRE_TEST_DIR = ../tests/rust; 33 PROTOC = lib.getExe pkgs.protobuf; 34 }; 35 in 36 commonArgs; 37 buildRustProgram = 38 extra: 39 let 40 args = builtins.removeAttrs extra [ "name" ]; 41 in 42 craneLib.buildPackage ( 43 { 44 cargoArtifacts = craneLib.buildDepsOnly commonArgs; 45 } 46 // args 47 // commonArgs 48 ); 49 }; 50 }; 51}