flake.nix provides pipewire paths through env

This commit is contained in:
Emile Clark-Boman 2025-09-03 14:52:35 +10:00
parent 680b3500b9
commit eabd640e2d

View file

@ -22,7 +22,7 @@
# list directory contents as absolute paths
lsAbsolute = with builtins;
path:
map (name: toPath path + toPath name) (attrNames (readDir path));
map (name: (toPath path) + "/" + name) (attrNames (readDir path));
in {
overlays.default = final: prev: {
dorne = final.haskellPackages.developPackage {
@ -47,6 +47,7 @@
# C Dependencies
pipewire
pipewire.dev
# Language/Development Tooling
clang-tools
@ -58,9 +59,24 @@
shell = "${pkgs.bash}/bin/bash";
# SPA API is provided by pipewire's "dev" derivation output
C_INCLUDE_PATH =
builtins.concatStringSep ":"
(lsAbsolute "${pkgs.pipewire.dev}/include");
NIX_CFLAGS_COMPILE = let
# libpipewire (and libspa)
Ipipewire =
lsAbsolute "${pkgs.pipewire.dev}/include";
Ivendor =
builtins.map
(x: "-isystem ${x}")
Ipipewire;
in
builtins.concatStringsSep " " ([
(builtins.getEnv
"NIX_CFLAGS_COMPILE")
]
++ Ivendor);
DORNE_LDFLAGS = let
in "-L${pkgs.pipewire}/lib";
};
}
);