54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
|
{
|
||
|
description = "monitors discord to controll lights";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||
|
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, rust-overlay }:
|
||
|
let
|
||
|
# Systems supported
|
||
|
allSystems = [
|
||
|
"x86_64-linux" # 64-bit Intel/AMD Linux
|
||
|
"aarch64-linux" # 64-bit ARM Linux
|
||
|
"x86_64-darwin" # 64-bit Intel macOS
|
||
|
"aarch64-darwin" # 64-bit ARM macOS
|
||
|
];
|
||
|
|
||
|
# Helper to provide system-specific attributes
|
||
|
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
||
|
pkgs = import nixpkgs { inherit system; };
|
||
|
});
|
||
|
in
|
||
|
{
|
||
|
packages = forAllSystems ({ pkgs }: {
|
||
|
default = let
|
||
|
stdenv = pkgs.stdenv;
|
||
|
lib = pkgs.lib;
|
||
|
in
|
||
|
pkgs.rustPlatform.buildRustPackage {
|
||
|
pname = "lights";
|
||
|
version = "0.1";
|
||
|
src = ./.;
|
||
|
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
||
|
# doCheck = false;
|
||
|
# RUST_BACKTRACE=1;
|
||
|
buildInputs = with pkgs; [
|
||
|
];
|
||
|
nativeBuildInputs = with pkgs; [
|
||
|
pkg-config
|
||
|
clang
|
||
|
llvmPackages.libclang
|
||
|
rust-analyzer
|
||
|
];
|
||
|
cargoLock = {
|
||
|
lockFile = ./Cargo.lock;
|
||
|
};
|
||
|
};
|
||
|
});
|
||
|
};
|
||
|
}
|
||
|
|