Files
n34/flake.nix
Awiteb dfa7467b1e chore: do not check the MSRV
Signed-off-by: Awiteb <a@4rs.nl>
2025-09-18 09:05:38 +00:00

70 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
in
with pkgs;
{
# n34 development environment
devShells.default = mkShell {
packages = [
dbus
git-cliff
just
mdbook
nushell
pkg-config
taplo
];
nativeBuildInputs = [
(lib.hiPrio rust-bin.nightly."2025-08-07".rustfmt)
rust-bin.stable.latest.default
rust-analyzer
];
};
# Build n34
packages.default =
let
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
in
with pkgs;
rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = lib.cleanSource ./.;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
dbus
];
meta = {
inherit (manifest) description homepage;
license = lib.licenses.gpl3Plus;
};
};
}
);
}