Live location tracking and playback for the game "manhunt"

Better workspace splitting in Nix

bwc9876.dev 1125fe47 388c1505

verified
+13 -25
+7 -12
nix/packages/manhunt-signaling.nix
··· 6 6 rustPlatform.buildRustPackage { 7 7 pname = "manhunt-signaling"; 8 8 version = "0.1.0"; 9 - src = with lib.fileset; 10 - toSource { 11 - root = ../../.; 12 - fileset = unions [ 13 - ../../Cargo.toml 14 - ../../Cargo.lock 15 - ../../backend 16 - ../../manhunt-signaling 17 - ]; 18 - }; 9 + src = ../../manhunt-signaling; 19 10 cargoLock.lockFile = ../../Cargo.lock; 20 - buildAndTestSubdir = "manhunt-signaling"; 11 + 12 + postPatch = '' 13 + cp ${../../Cargo.lock} Cargo.lock 14 + chmod +w Cargo.lock 15 + ''; 21 16 22 17 postCheck = '' 23 - cargo clippy -p manhunt-signaling --no-deps -- -D warnings 18 + cargo clippy --no-deps -- -D warnings 24 19 ''; 25 20 26 21 nativeBuildInputs = [clippy];
+6 -13
nix/packages/manhunt.nix
··· 16 16 rustPlatform.buildRustPackage { 17 17 pname = "manhunt"; 18 18 version = "0.1.0"; 19 - src = with lib.fileset; 20 - toSource { 21 - root = ../../.; 22 - fileset = unions [ 23 - ../../Cargo.toml 24 - ../../Cargo.lock 25 - ../../backend 26 - ../../manhunt-signaling 27 - ]; 28 - }; 19 + src = ../../backend; 29 20 cargoLock.lockFile = ../../Cargo.lock; 30 - buildAndTestSubdir = "backend"; 31 21 buildFeatures = [ 32 22 "tauri/custom-protocol" 33 23 ]; 34 24 35 25 postCheck = '' 36 - cargo clippy -p backend --no-deps -- -D warnings 26 + cargo clippy --no-deps -- -D warnings 37 27 ''; 38 28 39 29 nativeBuildInputs = [ ··· 53 43 ]; 54 44 55 45 postPatch = '' 56 - substituteInPlace backend/tauri.conf.json \ 46 + cp ${../../Cargo.lock} Cargo.lock 47 + chmod +w Cargo.lock 48 + 49 + substituteInPlace tauri.conf.json \ 57 50 --replace '"frontendDist": "../frontend/dist"' '"frontendDist": "${manhunt-frontend}"' 58 51 ''; 59 52