pipewire-autoconnect/flake.nix

58 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-05-08 14:22:31 +01:00
{
description = "Rust example flake for Zero to Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
2023-05-08 19:17:41 +01:00
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
2023-05-08 14:22:31 +01:00
};
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 {
2023-05-08 19:26:41 +01:00
pname = "pipewire-autoconnect";
version = "0.1";
2023-05-08 14:22:31 +01:00
src = ./.;
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
2023-05-08 20:29:35 +01:00
# doCheck = false;
2023-05-08 14:22:31 +01:00
# RUST_BACKTRACE=1;
buildInputs = with pkgs; [
pipewire
libspatialaudio
];
nativeBuildInputs = with pkgs; [
pkg-config
clang
llvmPackages.libclang
];
cargoLock = {
lockFile = ./Cargo.lock;
};
2023-05-08 20:29:35 +01:00
#installPhase = ''
# mkdir -p $out/bin
# #cp ./target/release/pipewire-autoconnect $out/bin
#'';
2023-05-08 14:22:31 +01:00
};
});
};
}