wayland_panel/flake.nix

46 lines
1.1 KiB
Nix

{
description = "My rust development shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...} @ inputs: let
system = "x86_64-linux";
overlays = [(import inputs.rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-analyzer" "rust-src"];
};
rustPlatform = pkgs.makeRustPlatform {
cargo = rustToolchain;
rustc = rustToolchain;
};
in {
packages."${system}" = {
default = rustPlatform.buildRustPackage {
pname = "wayland_panel";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
};
devShells."${system}" = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
gnumake
rustToolchain
evcxr
];
};
};
};
}