From 145b75fe00612487baaf8cebaf7c36201953a50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 22 Aug 2021 22:49:20 +0200 Subject: [PATCH] mpv: split dev and man output --- pkgs/applications/video/mpv/default.nix | 8 ++++++-- pkgs/applications/video/mpv/wrapper.nix | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 3bde15430579..93c3b2203b75 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -97,6 +97,8 @@ in stdenv.mkDerivation rec { pname = "mpv"; version = "0.33.1"; + outputs = [ "out" "dev" ]; + src = fetchFromGitHub { owner = "mpv-player"; repo = "mpv"; @@ -153,8 +155,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ addOpenGLRunpath docutils perl pkg-config python3 wafHook which - ] - ++ optional swiftSupport swift; + ] ++ optional swiftSupport swift; buildInputs = [ ffmpeg freetype libass libpthreadstubs @@ -206,6 +207,9 @@ in stdenv.mkDerivation rec { cp TOOLS/umpv $out/bin cp $out/share/applications/mpv.desktop $out/share/applications/umpv.desktop sed -i '/Icon=/ ! s/mpv/umpv/g' $out/share/applications/umpv.desktop + + substituteInPlace $out/lib/pkgconfig/mpv.pc \ + --replace "$out/include" "$dev/include" '' + optionalString stdenv.isDarwin '' mkdir -p $out/Applications cp -r build/mpv.app $out/Applications diff --git a/pkgs/applications/video/mpv/wrapper.nix b/pkgs/applications/video/mpv/wrapper.nix index 4d61971956e9..5225197772c7 100644 --- a/pkgs/applications/video/mpv/wrapper.nix +++ b/pkgs/applications/video/mpv/wrapper.nix @@ -61,7 +61,8 @@ let symlinkJoin { name = "mpv-with-scripts-${mpv.version}"; - paths = [ mpv ]; + # TODO: don't link all mpv outputs and convert package to mpv-unwrapped? + paths = [ mpv.all ]; buildInputs = [ makeWrapper ];