WIP: flake.nix: set /home/h7x4/.local/share/cargo for all relevant derivations
Build and test / build-static-library (push) Failing after 1m49s
Build and test / test (push) Failing after 2m2s
Build and test / build-shared-library (push) Failing after 2m37s

This commit is contained in:
2026-05-07 00:51:39 +09:00
parent 26f30de32e
commit a6a18238c4
+14 -2
View File
@@ -28,9 +28,12 @@
};
rust-bin = rust-overlay.lib.mkRustBin { } pkgs.buildPackages;
toolchain = rust-bin.stable.latest.default.override {
toolchain = (rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" "rust-std" ];
};
}).overrideAttrs (old: {
env.HOME = "/tmp";
env.CARGO_HOME = "/tmp/cargo-home";
});
in f system pkgs toolchain);
in {
devShells = forAllSystems (system: pkgs: toolchain: {
@@ -74,6 +77,9 @@
version = cargoToml.package.version;
inherit src;
env.HOME = "/tmp";
env.CARGO_HOME = "/tmp/cargo-home";
strictDeps = true;
doCheck = false;
@@ -91,6 +97,9 @@
strictDeps = true;
doCheck = false;
env.HOME = "/tmp";
env.CARGO_HOME = "/tmp/cargo-home";
postPatch = ''
'${lib.getExe pkgs.yq-go}' '.lib.crate-type = [ "staticlib" ]' --inplace Cargo.toml
'';
@@ -117,6 +126,9 @@
inherit src;
strictDeps = true;
env.HOME = "/tmp";
env.CARGO_HOME = "/tmp/cargo-home";
buildInputs = with pkgs; [
sqlite
];