forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / pw / pw-viz / package.nix
blob25a4978d9885ce2b61baa715ed1690b59a535cb5
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , pkg-config
5 , expat
6 , fontconfig
7 , freetype
8 , libGL
9 , libxkbcommon
10 , pipewire
11 , wayland
12 , xorg
15 rustPlatform.buildRustPackage rec {
16   pname = "pw-viz";
17   version = "0.3.0";
19   src = fetchFromGitHub {
20     owner = "ax9d";
21     repo = pname;
22     rev = "v${version}";
23     sha256 = "sha256-fB7PnWWahCMKhGREg6neLmOZjh2OWLu61Vpmfsl03wA=";
24   };
26   cargoLock = {
27     lockFile = ./Cargo.lock;
28     outputHashes = {
29       "egui_nodes-0.1.4" = "sha256-Bb88T+erjgKD769eYOSiVEg9lFnB5pBEDLeWgCdyUus=";
30     };
31   };
33   nativeBuildInputs = [ pkg-config ];
35   buildInputs = [
36     expat
37     fontconfig
38     freetype
39     libGL
40     libxkbcommon
41     pipewire
42     rustPlatform.bindgenHook
43     wayland
44     xorg.libX11
45     xorg.libXcursor
46     xorg.libXi
47     xorg.libXrandr
48   ];
50   postFixup = ''
51     patchelf $out/bin/pw-viz \
52       --add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]}
53   '';
55   # enables pipewire API deprecated in 0.3.64
56   # fixes error caused by https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55
57   env.NIX_CFLAGS_COMPILE = toString [ "-DPW_ENABLE_DEPRECATED" ];
59   meta = with lib; {
60     description = "Simple and elegant pipewire graph editor";
61     homepage = "https://github.com/ax9d/pw-viz";
62     license = licenses.gpl3Only;
63     maintainers = with maintainers; [ figsoda ];
64     platforms = platforms.linux;
65   };