64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{
|
|
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;
|
|
|
|
libPath = with pkgs; lib.makeLibraryPath [
|
|
libxkbcommon
|
|
libGL
|
|
wayland
|
|
fontconfig
|
|
];
|
|
|
|
in
|
|
{
|
|
devShells = {
|
|
default =
|
|
with pkgs;
|
|
mkShell {
|
|
buildInputs = [
|
|
rust
|
|
cargo-nextest
|
|
fish
|
|
pkg-config
|
|
fontconfig
|
|
];
|
|
|
|
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${libPath}";
|
|
|
|
shellHook = ''
|
|
echo Entered Rust dev shell for project SoftwareManager-rs
|
|
exec fish
|
|
'';
|
|
};
|
|
};
|
|
}
|
|
);
|
|
|
|
}
|