2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2023-01-11 07:51:40 +00:00
|
|
|
, expat
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
2022-12-17 10:02:37 +00:00
|
|
|
, libGL
|
2023-01-11 07:51:40 +00:00
|
|
|
, libxkbcommon
|
2022-12-17 10:02:37 +00:00
|
|
|
, pipewire
|
2023-01-11 07:51:40 +00:00
|
|
|
, wayland
|
2022-12-17 10:02:37 +00:00
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "pw-viz";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.2.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ax9d";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-lw4whdh8tNoS5XUlamQCq8f8z8K59uD90PSSo3skeyo=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
cargoSha256 = "sha256-XmvM5tr6ToYi0UrFnLju1wmp/0VEEP/O7T9Bx0YyFW4=";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2022-12-17 10:02:37 +00:00
|
|
|
libGL
|
2023-01-11 07:51:40 +00:00
|
|
|
libxkbcommon
|
2022-12-17 10:02:37 +00:00
|
|
|
pipewire
|
|
|
|
rustPlatform.bindgenHook
|
2023-01-11 07:51:40 +00:00
|
|
|
wayland
|
2022-12-17 10:02:37 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
2023-01-11 07:51:40 +00:00
|
|
|
xorg.libXrandr
|
2022-12-17 10:02:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2023-01-11 07:51:40 +00:00
|
|
|
patchelf $out/bin/pw-viz \
|
|
|
|
--add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]}
|
2022-12-17 10:02:37 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
# enables pipewire API deprecated in 0.3.64
|
|
|
|
# fixes error caused by https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-DPW_ENABLE_DEPRECATED" ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple and elegant pipewire graph editor ";
|
|
|
|
homepage = "https://github.com/ax9d/pw-viz";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|