Update flake

This commit is contained in:
Invariantspace 2024-02-08 20:39:53 -08:00
parent 82b3dcc8d3
commit ee07fd48d0
2 changed files with 37 additions and 45 deletions

View file

@ -16,29 +16,24 @@
pkgs = nixpkgs.legacyPackages.${system};
fenixPkgs = fenix.packages.${system};
craneLib = crane.lib.${system};
src = craneLib.cleanCargoSource (craneLib.path ./.);
src = craneLib.path ./.;
# Common arguments can be set here to avoid repeating them later
commonArgs = {
commonArgs = with pkgs; {
inherit src;
strictDeps = true;
buildInputs = [
# Add additional build inputs here
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
] ++ lib.optionals stdenv.isDarwin [
# Additional darwin specific inputs can be set here
pkgs.libiconv
libiconv
];
# Additional environment variables can be set directly
# MY_CUSTOM_VAR = "some value";
};
craneLibLLvmTools = craneLib.overrideToolchain
(fenixPkgs.complete.withComponents [
"cargo"
"llvm-tools"
"rustc"
]);
craneLibLLvmTools = craneLib.overrideToolchain fenixPkgs.complete;
# Build *just* the cargo dependencies, so we can reuse
# all of that work (e.g. via cachix) when running in CI
@ -112,14 +107,11 @@
# Consider customizing deny.toml
# checks = self.checks.${system};
# Additional dev-shell environment variables can be set directly
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
# Extra inputs can be added here; cargo and rustc are provided by default
packages = [
fenixPkgs.rust-analyzer
# pkgs.ripgrep
];
RUST_SRC_PATH = "${fenixPkgs.complete.rust-src}/lib/rustlib/src/rust/library";
};
});
}