add nix dev flake for development on nixos
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
{
|
||||
description = "Nix development flake for SoftwareManager-rs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
utils,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
|
||||
utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
|
||||
libs = with pkgs; [
|
||||
libX11
|
||||
libXrandr
|
||||
libXinerama
|
||||
libXcursor
|
||||
libXi
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
default =
|
||||
with pkgs;
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
rust
|
||||
cargo-nextest
|
||||
]
|
||||
++ libs;
|
||||
|
||||
shellHook = ''
|
||||
echo Entered Rust dev shell for project SoftwareManager-rs
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user