nix: Nix flake maintenance

The nix flake's checks were failing for various reasons. The following fixes are
applied to get it up to date again.

- Update to release-24.11, since `crane` requires it – also to keep up-to-date
- Add `.json` to the source filters to allow for testing patch migration
- Ensure that the `rad` and `git-remote-rad` binaries are built for the nextest
  check. N.b. the binaries need to be in the target dir of `radicle-cli` since
  that is where the nextest check runs from.
- Add `cargo-audit` and `cargo-deny`, to the devShell, to allow for running those
  tools locally
- Bump `gix-path` to 0.10.11 to avoid a vulnerability[^0]

[^0]: https://rustsec.org/advisories/RUSTSEC-2024-0371
This commit is contained in:
Fintan Halpenny 2025-02-21 12:00:41 +00:00
parent c2863c08ab
commit 170915ffcf
4 changed files with 31 additions and 30 deletions

8
Cargo.lock generated
View File

@ -1042,9 +1042,9 @@ dependencies = [
[[package]]
name = "gix-path"
version = "0.10.9"
version = "0.10.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d23d5bbda31344d8abc8de7c075b3cf26e5873feba7c4a15d916bce67382bd9"
checksum = "ebfc4febd088abdcbc9f1246896e57e37b7a34f6909840045a1767c6dafac7af"
dependencies = [
"bstr",
"gix-trace",
@ -1137,9 +1137,9 @@ dependencies = [
[[package]]
name = "gix-trace"
version = "0.1.9"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e"
checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7"
[[package]]
name = "gix-transport"

View File

@ -48,6 +48,7 @@ allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
"Unicode-3.0",
"BSD-3-Clause",
"MPL-2.0"
]

View File

@ -3,11 +3,11 @@
"advisory-db": {
"flake": false,
"locked": {
"lastModified": 1722017365,
"narHash": "sha256-9wYR5NZIgI+qzMDlJrUzevR31fvFQRgfjlYp50Xp3Ts=",
"lastModified": 1739520703,
"narHash": "sha256-UqR1f9gThWNBCBobWet7T46vTSxkB6dVAdeqNBoF8mc=",
"owner": "rustsec",
"repo": "advisory-db",
"rev": "9d024c07ee8c18609b43436bc865abf46636e250",
"rev": "ddccfe8aced779f7b54d27bbe7e122ecb1dda33a",
"type": "github"
},
"original": {
@ -17,17 +17,12 @@
}
},
"crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1722907532,
"narHash": "sha256-i/j/dMZPR7uJoQPFTa6UCahLu8kMtozYuR83lIKMERM=",
"lastModified": 1739936662,
"narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "d0c8f4ed8571c533b31c1d68e4ebc534b790cc5c",
"rev": "19de14aaeb869287647d9461cbd389187d8ecdb7",
"type": "github"
},
"original": {
@ -41,11 +36,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -56,16 +51,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1722940684,
"narHash": "sha256-X8JnSq0ruRWsU4PdYuxV+8W4W66F1lnCcxIZZMWzo4E=",
"lastModified": 1740142985,
"narHash": "sha256-fCPt2PVnQgiHXGlTRmU5/gFdG/+JT3ycpt+GxY1Vp+s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a3103d68517c6ad262ea27c96fc4a38ad81be7a0",
"rev": "1d1ce35bb6052a23f5692cd89b7cc49acdcb8d0e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
@ -86,11 +81,11 @@
]
},
"locked": {
"lastModified": 1722910815,
"narHash": "sha256-v6Vk/xlABhw2QzOa6xh3Jx/IvmlbKbOazFM+bDFQlWU=",
"lastModified": 1740104932,
"narHash": "sha256-FaN+HBAhOW1wAjxPI/Ko1DX0ax4ucHCZoMJ0dGMxm8o=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "7df2ac544c203d21b63aac23bfaec7f9b919a733",
"rev": "c932b3873a5d56126bc1f1416fb8a58315f86c17",
"type": "github"
},
"original": {

View File

@ -2,18 +2,16 @@
description = "Radicle";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
@ -54,6 +52,7 @@
".diff" # testing
".md" # testing
".adoc" # man pages
".json" # testing samples
]
||
# Default filter from crane (allow .rs files)
@ -136,9 +135,13 @@
nativeBuildInputs = [
# git is required so the sandbox can access it.
pkgs.git
# Ensure that `git-remote-rad` is present for testing.
self.packages.${system}.radicle-remote-helper
];
# Ensure that the binaries are built for the radicle-cli tests to
# avoid timeouts
preCheck = ''
cargo build -p radicle-remote-helper --target-dir radicle-cli/target
cargo build -p radicle-cli --target-dir radicle-cli/target
'';
# Ensure dev is used since we rely on env variables being
# set in tests.
env.CARGO_PROFILE = "dev";
@ -229,6 +232,8 @@
devShells.default = craneLib.devShell {
# Extra inputs can be added here; cargo and rustc are provided by default.
packages = with pkgs; [
cargo-audit
cargo-deny
cargo-watch
cargo-nextest
ripgrep