81 lines
1.7 KiB
Nix
81 lines
1.7 KiB
Nix
{
|
|
description = "Romodoro flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
crane.url = "github:ipetkov/crane";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, crane, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
craneLib = crane.mkLib pkgs;
|
|
|
|
commonArgs = {
|
|
src = craneLib.cleanCargoSource ./.;
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = with pkgs;[
|
|
pkg-config
|
|
alsa-oss
|
|
alsa-lib.dev
|
|
alsa-utils
|
|
git
|
|
cmake
|
|
];
|
|
buildInputs = with pkgs;[
|
|
alsa-oss
|
|
alsa-lib.dev
|
|
alsa-utils
|
|
git
|
|
pkg-config
|
|
git
|
|
cmake
|
|
];
|
|
|
|
};
|
|
|
|
romodoro = craneLib.buildPackage (commonArgs // {
|
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
|
|
|
});
|
|
in
|
|
{
|
|
checks = {
|
|
inherit romodoro;
|
|
};
|
|
|
|
packages.default = romodoro;
|
|
|
|
apps.default = flake-utils.lib.mkApp {
|
|
drv = romodoro;
|
|
};
|
|
|
|
devShells.default = craneLib.devShell {
|
|
# Inherit inputs from checks.
|
|
checks = self.checks.${system};
|
|
|
|
LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
|
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
packages = with pkgs; [
|
|
openssl
|
|
pkg-config
|
|
libiconv
|
|
|
|
alsa-oss
|
|
alsa-lib.dev
|
|
alsa-utils
|
|
git
|
|
pkg-config
|
|
git
|
|
cmake
|
|
];
|
|
};
|
|
});
|
|
}
|