1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

ffmpeg: split into multiple outputs

Also fix some referrers.
This commit is contained in:
Vladimír Čunát 2015-10-11 16:34:23 +02:00
parent 493c947e4a
commit 4a571ba0dd
8 changed files with 19 additions and 10 deletions

View file

@ -153,7 +153,7 @@ in
users.extraGroups.subsonic.gid = config.ids.gids.subsonic;
services.subsonic.transcoders = mkDefault [ "${pkgs.ffmpeg}/bin/ffmpeg" ];
services.subsonic.transcoders = mkDefault [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
};
}

View file

@ -12,7 +12,7 @@ buildPerlPackage {
mkdir -p $out/bin
cp get_iplayer $out/bin
sed -i 's|^update_script|#update_script|' $out/bin/get_iplayer
wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB
wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg.bin}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB
'';
src = fetchurl {

View file

@ -106,14 +106,14 @@ a.composableDerivation.composableDerivation {} (fix: {
name = "ffmpeg";
enable = {
configureFlags = [
"--with-ffmpeg-libs=${a.ffmpeg}/lib"
"--with-ffmpeg-includes=${a.ffmpeg}/include"
"--with-ffmpeg-libs=${a.ffmpeg.out}/lib"
"--with-ffmpeg-includes=${a.ffmpeg.dev}/include"
];
# is there a nicer way to pass additional include directories?
# this should work: --with-ffmpeg-includes=/usr/include/lib[av|sw]*
# I did not try
preConfigure = ''
for dir in ${a.ffmpeg}/include/*; do
for dir in ${a.ffmpeg.dev}/include/*; do
if [ -d $dir ]; then
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$dir"
fi

View file

@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
postPatch = stdenv.lib.optionalString (ffmpeg != null) ''
substituteInPlace converter_ffmpeg.cpp \
--replace '"ffmpeg"' '"${ffmpeg}/bin/ffmpeg"' \
--replace '"ffmpeg ' '"${ffmpeg}/bin/ffmpeg '
--replace '"ffmpeg"' '"${ffmpeg.bin}/bin/ffmpeg"' \
--replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg '
'';
configurePhase = ''

View file

@ -4,7 +4,7 @@ let
wrapper = writeScript "dvd-slideshow.sh" ''
#!/bin/bash
# wrapper script for dvd-slideshow programs
export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbisTools}/bin:$PATH
export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg.bin}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbisTools}/bin:$PATH
dir=`dirname "$0"`
exe=`basename "$0"`

View file

@ -33,7 +33,7 @@ buildPythonPackage rec {
sed -i -e 's|/usr/bin/||' -e 's|/usr||' \
-e 's/BUILD_TIME[^,]*/BUILD_TIME=0/' setup.py
sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg}/bin/ffmpeg"|' \
sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg.bin}/bin/ffmpeg"|' \
plat/options.py
sed -i -e 's|/usr/share/miro/themes|'"$out/share/miro/themes"'|' \

View file

@ -67,6 +67,10 @@ stdenv.mkDerivation rec {
patchPhase = ''patchShebangs .'';
outputs = [ "dev" "out" "bin" ]
++ optional (reqMin "1.0") "doc" ; # just dev-doc
setOutputFlags = false; # doesn't accept all and stores configureFlags in libs!
configureFlags = [
# License
"--enable-gpl"
@ -145,6 +149,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postFixup = ''
_moveToOutput bin "$bin"
_moveToOutput share/ffmpeg/examples "$doc"
'';
/* Cross-compilation is untested, consider this an outline, more work
needs to be done to portions of the build to get it to work correctly */
crossAttrs = let

View file

@ -21,7 +21,7 @@ buildPythonPackage rec {
# Ensure ffmpeg is available in $PATH for post-processing & transcoding support.
postInstall = stdenv.lib.optionalString (ffmpeg != null)
''wrapProgram $out/bin/youtube-dl --prefix PATH : "${ffmpeg}/bin"'';
''wrapProgram $out/bin/youtube-dl --prefix PATH : "${ffmpeg.bin}/bin"'';
meta = with stdenv.lib; {
homepage = "http://rg3.github.com/youtube-dl/";