flake: replace naersk with crane (#538)
Framework swap, no public API change. - naersk input → crane (`github:ipetkov/crane`); crane is stateless, no nixpkgs.follows needed. - `forAllSystems` exposes `craneLib = crane.mkLib pkgs`, `cargoArtifacts = craneLib.buildDepsOnly` (built once, reused), and a shared `nativeBuildInputs = [ pkgs.librsvg pkgs.git ]` consumed by buildDepsOnly + buildPackage + cargoClippy so the three derivations see the same toolchain shape. - `packages.default = craneLib.buildPackage` (was naersk-lib.buildPackage) with explicit `pname = "hyperhive-workspace"; version = "0.1.0";` — the virtual workspace Cargo.toml has no [package].name so crane needs the hint. - `checks.clippy = craneLib.cargoClippy` (was naersk + overrideAttrs hack). Crane parses `cargoClippyExtraArgs = "--workspace --all-targets -- -D warnings"` correctly; naersk's `mode = "clippy"` used to mangle the `--` separator which is why the old wiring went through overrideAttrs. The whole hack — including `doCheck = false`, `copyTarget = false`, and the swapped buildPhase/installPhase — is now gone. - librsvg native dep (#424) preserved on all three derivations. Added pkgs.git too — naersk auto-included it; crane is more minimal, so hive-c0re's `lifecycle::tests::setup_proposed_*` (which shell out to `git init`+commit) need it explicit to pass under `cargo test` in the sandbox. - build.rs + hive-c0re/Cargo.toml comments updated from "naersk derivation" to "crane derivation". - 3 doc-list-indentation lints in hive-sh4re/src/lib.rs cleaned up (replaced `+`-at-line-start with `and`/`/` so doc continuations don't trigger `clippy::doc_lazy_continuation`). Validated locally: `nix build .#default --fallback` succeeds, all 117 tests pass, all four bins in `result/bin/`.
This commit is contained in:
parent
b652e6a6b0
commit
4b6c733afb
5 changed files with 88 additions and 111 deletions
63
flake.lock
generated
63
flake.lock
generated
|
|
@ -1,45 +1,17 @@
|
|||
{
|
||||
"nodes": {
|
||||
"fenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"naersk",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1752475459,
|
||||
"narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
|
||||
"lastModified": 1779130139,
|
||||
"narHash": "sha256-BLrtr42azquO7MdGFU5a7KiMl3YpFlTeIXqy1fT5GlQ=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "edb38893982a3338972bb4a2ec7ce7c29ba10fd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"fenix": "fenix",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778151388,
|
||||
"narHash": "sha256-lldMJPUeouEjO8/7aLuwhcsIw29vVihm2ZALzjiqfec=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "efdddff9ff4d8e7d0056d57ec67dac50f75ab8f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
@ -77,29 +49,12 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"crane": "crane",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1752428706,
|
||||
"narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "591e3b7624be97e4443ea7b5542c191311aa141d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rust-lang",
|
||||
"ref": "nightly",
|
||||
"repo": "rust-analyzer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue