romodoro/flake.nix

78 lines
1.7 KiB
Nix
Raw Normal View History

2024-05-21 19:51:46 +02:00
{
description = "romodoro builder";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems =
[
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
});
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.rustPlatform.buildRustPackage {
pname = "romodoro";
2024-05-21 21:25:41 +02:00
version = "0.1.1";
2024-05-21 19:51:46 +02:00
src = ./.;
nativeBuildInputs = [
pkgs.pkg-config
pkgs.alsa-oss
pkgs.alsa-lib.dev
pkgs.alsa-utils
pkgs.git
pkgs.cmake
];
buildInputs = [
pkgs.alsa-oss
pkgs.alsa-lib.dev
pkgs.alsa-utils
pkgs.git
pkgs.pkg-config
pkgs.git
pkgs.cmake
];
cargoLock.lockFile = ./Cargo.lock;
};
});
devShells.default =
with nixpkgs; mkShell
{
LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
RUST_BACKTRACE = 1;
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
packages = with pkgs; [
rustc
cargo
rustfmt
rust-analyzer
clippy
rustup
pkg-config
openssl
];
};
};
}