Hello all,
When I try to compile a test C++ project in my devshell, I have to preface all my pipewire dependancies with pipewire-0.3
so for example, /nix/store/a-long-hash-pipewire-1.2.5-dev/include/pipewire-0.3/pipewire/array.h
.
This is not so bad, I can just write out my includes like that, but then pipewire internally is not expecting that extra bit of file path. Is there a more experienced nixer out there who can let me know how I should proceed? Can I do something in the development shell to install the pipewire dev depends with a simple include/pipewire/array.h
?
Please post the nix code you wrote for your shell.
Sure thing, here is the dev shell part, and I’m using the unstable nixpkgs at the top:
# Development environment output
devShells = forAllSystems ({ pkgs }: {
default =
let
python = pkgs.python312;
venv = ".venv";
lib-path = with pkgs; lib.makeLibraryPath [
libffi
openssl
stdenv.cc.cc
zlib
];
in
pkgs.mkShell {
# The Nix packages provided in the environment
buildInputs = with pkgs; [
clang-tools
clang
cmake
ninja
boost # The Boost libraries
gcc # The GNU Compiler Collection
chibi # embedded lisp/scheme
rustToolchain # cargo, Clippy, cargo-fmt, rustdoc, rustfm
(python.withPackages (ps: with ps; [
virtualenv # venv
pip # The pip installer
black
ipython # repl
ruff
pygobject3 # maybe needed for cairo?
notebook
]))
gtk3
gtk4
gobject-introspection
cairo
librsvg
gdb
pipewire
eigen
abseil-cpp
websocketpp
bazel_7
bazel-buildtools
];
nativeBuildInputs = with pkgs; [
pkg-config
];
};
bazel = pkgs.mkShellNoCC {
name = "rules_nixpkgs_shell";
packages = with pkgs; [ bazel_7 bazel-buildtools cacert nix git ];
};
});
};
}
Also, I looked at the meson.build file in the pipewire repo. That’s where the spa-0.2 and pipewire-0.3 path prefixes are coming from. What’s weird is the pipewire libraries seem to not expect them to be there in the final build. The includes are all just spa/etc/etc
and pipewire/etc
should I try and use some nix magic in an overlay or something that overrides the meson build? Or can I do it in a shellhook in the dev environment?