noise-rs/flake.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2025-06-07 11:24:20 +02:00
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
2025-06-13 13:09:18 +02:00
outputs =
{
self,
nixpkgs,
utils,
naersk,
}:
utils.lib.eachDefaultSystem (
system:
2025-06-07 11:24:20 +02:00
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
{
2025-06-18 09:30:08 +02:00
packages.default = naersk-lib.buildPackage rec {
2025-06-15 19:12:07 +02:00
src = ./.;
nativeBuildInputs = with pkgs; [
libnotify
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath nativeBuildInputs;
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
};
2025-06-13 13:09:18 +02:00
devShell =
with pkgs;
mkShell {
buildInputs = [
cargo
rustc
rustfmt
pre-commit
rustPackages.clippy
libnotify
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
2025-06-15 19:12:07 +02:00
RUST_BACKTRACE = 1;
2025-06-13 13:09:18 +02:00
};
2025-06-07 11:24:20 +02:00
}
);
}