flake: cleanup of Rust within devShell
This commit is contained in:
parent
28b8edfc6e
commit
1a4d3ec018
1 changed files with 3 additions and 14 deletions
17
flake.nix
17
flake.nix
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
description = "Rust development environment for bunbun using fenix";
|
description = "Rust development environment for bunbun";
|
||||||
inputs = {
|
inputs = {
|
||||||
fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs-unstable"; };
|
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
@ -10,27 +9,17 @@
|
||||||
utils.lib.eachDefaultSystem
|
utils.lib.eachDefaultSystem
|
||||||
(
|
(
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs-unstable { inherit system; overlays = [fenix.overlays.default]; };
|
pkgs = import nixpkgs-unstable { inherit system; };
|
||||||
toolchain = pkgs.fenix.complete;
|
|
||||||
in rec
|
in rec
|
||||||
{
|
{
|
||||||
packages.default =
|
packages.default =
|
||||||
(pkgs.makeRustPlatform {
|
(pkgs.makeRustPlatform.buildRustPackage {
|
||||||
inherit (toolchain) cargo rustc;
|
|
||||||
})
|
|
||||||
.buildRustPackage {
|
|
||||||
pname = "bunbun";
|
pname = "bunbun";
|
||||||
version = "1.3.0";
|
version = "1.3.0";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
};
|
};
|
||||||
apps.default = utils.lib.mkApp {drv = packages.default;};
|
apps.default = utils.lib.mkApp {drv = packages.default;};
|
||||||
devShells.default = pkgs.mkShell rec {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
(with toolchain; [ cargo rustc rust-src clippy rustfmt ])
|
|
||||||
];
|
|
||||||
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue