3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-12-24 13:56:53 +00:00

Add support for running rust-cache commands from within a Nix shell (#290)

This commit is contained in:
marc0246 2025-12-01 19:56:12 +01:00 committed by GitHub
parent 779680da71
commit 151eeee51b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 167 additions and 43 deletions

31
tests/flake.nix Normal file
View file

@ -0,0 +1,31 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, nixpkgs, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
in {
devShells.default = with pkgs; mkShell {
buildInputs = [
autoconf
gcc
gnumake
openssl
pkg-config
rust-bin.stable.latest.minimal
];
CARGO_TERM_COLOR = "always";
};
}
);
}