From eabd640e2d01ef0828f55f1db7f04ce4c852d83b Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Wed, 3 Sep 2025 14:52:35 +1000 Subject: [PATCH] flake.nix provides pipewire paths through env --- flake.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index dec9bb2..6c3618c 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; }; } );