Unverified Commit 8d481c27 authored by figsoda's avatar figsoda Committed by GitHub
Browse files

Merge pull request #209590 from figsoda/pw-viz

pw-viz: 0.1.0 -> 0.2.0
parents 1e3ac956 b41cc7cf
Loading
Loading
Loading
Loading
+16 −5
Original line number Diff line number Diff line
@@ -2,38 +2,49 @@
, rustPlatform
, fetchFromGitHub
, pkg-config
, expat
, fontconfig
, freetype
, libGL
, libxkbcommon
, pipewire
, wayland
, xorg
}:

rustPlatform.buildRustPackage rec {
  pname = "pw-viz";
  version = "0.1.0";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "ax9d";
    repo = pname;
    rev = "v${version}";
    sha256 = "1d46m7w6rzzjpxc2fxwka9xbz49szbfrl63kxlv6kw4lknrladjn";
    sha256 = "sha256-lw4whdh8tNoS5XUlamQCq8f8z8K59uD90PSSo3skeyo=";
  };

  cargoSha256 = "sha256-jx1mUP6ezpwUhmDD9tCJBhHCHU8fEMlB738yYfB1psc=";
  cargoSha256 = "sha256-XmvM5tr6ToYi0UrFnLju1wmp/0VEEP/O7T9Bx0YyFW4=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    expat
    fontconfig
    freetype
    libGL
    libxkbcommon
    pipewire
    rustPlatform.bindgenHook
    wayland
    xorg.libX11
    xorg.libXcursor
    xorg.libXi
    xorg.libxcb
    xorg.libXrandr
  ];

  postFixup = ''
    patchelf $out/bin/pw-viz --add-rpath ${lib.makeLibraryPath [ libGL xorg.libXrandr ]}
    patchelf $out/bin/pw-viz \
      --add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]}
  '';

  meta = with lib; {