flake: compact
This commit is contained in:
parent
b6ec8a4009
commit
fb31db723f
27
flake.nix
27
flake.nix
|
@ -1,29 +1,16 @@
|
|||
{
|
||||
description = "Rust development environment for bunbun using fenix";
|
||||
|
||||
inputs = {
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs-unstable"; };
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs-unstable,
|
||||
utils,
|
||||
fenix,
|
||||
...
|
||||
}:
|
||||
outputs = { self, nixpkgs-unstable, utils, fenix, ... }:
|
||||
utils.lib.eachDefaultSystem
|
||||
(
|
||||
system: let
|
||||
pkgs = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [fenix.overlays.default];
|
||||
};
|
||||
pkgs = import nixpkgs-unstable { inherit system; overlays = [fenix.overlays.default]; };
|
||||
toolchain = pkgs.fenix.complete;
|
||||
in rec
|
||||
{
|
||||
|
@ -37,16 +24,10 @@
|
|||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
# Executed by `nix run`
|
||||
apps.default = utils.lib.mkApp {drv = packages.default;};
|
||||
|
||||
# Used by `nix develop`
|
||||
devShells.default = pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
(with toolchain; [
|
||||
cargo rustc rust-src clippy rustfmt # rust components
|
||||
])
|
||||
(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