Improve Nix package and shell (#21075)

With an addition of useFetchCargoVendor, crane becomes less necessary
for our use. This reuses the package from nixpkgs as well as creating a
better devshell that both work on macOS.

I use Xcode's SDKROOT and DEVELOPER_DIR to point the swift in the
livekit client crate to a correct sdk when using a devshell. Devshell
should work without that once apple releases sources for the 15.1 SDK
but for now this is an easy fix

This also replaces fenix with rust-overlay because of issues with the
out-of-sandbox access I've noticed fenix installed toolchains have

Release Notes:

- N/A
This commit is contained in:
Stanislav Alekseev 2024-11-27 20:22:17 +02:00 committed by GitHub
parent c021ee60d6
commit 4564da2875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 326 additions and 238 deletions

70
flake.lock generated
View file

@ -1,41 +1,5 @@
{
"nodes": {
"crane": {
"locked": {
"lastModified": 1727060013,
"narHash": "sha256-/fC5YlJy4IoAW9GhkJiwyzk0K/gQd9Qi4rRcoweyG9E=",
"owner": "ipetkov",
"repo": "crane",
"rev": "6b40cc876c929bfe1e3a24bf538ce3b5622646ba",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1727073227,
"narHash": "sha256-1kmkEQmFfGVuPBasqSZrNThqyMDV1SzTalQdRZxtDRs=",
"owner": "nix-community",
"repo": "fenix",
"rev": "88cc292eb3c689073c784d6aecc0edbd47e12881",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
@ -53,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1726937504,
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
@ -69,26 +33,28 @@
},
"root": {
"inputs": {
"crane": "crane",
"fenix": "fenix",
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-analyzer-src": {
"flake": false,
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1726443025,
"narHash": "sha256-nCmG4NJpwI0IoIlYlwtDwVA49yuspA2E6OhfCOmiArQ=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "94b526fc86eaa0e90fb4d54a5ba6313aa1e9b269",
"lastModified": 1732242723,
"narHash": "sha256-NWI8csIK0ujFlFuEXKnoc+7hWoCiEtINK9r48LUUMeU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "a229311fcb45b88a95fdfa5cecd8349c809a272a",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}