2020-06-07 13:39:09 +01:00
|
|
|
{ stdenv, lib, fetchurl, writeScript, cdrtools, dvdauthor, ffmpeg_3, imagemagick, lame, mjpegtools, sox, transcode, vorbis-tools, runtimeShell }:
|
2015-06-10 10:34:51 +01:00
|
|
|
|
|
|
|
let
|
2020-06-07 13:39:09 +01:00
|
|
|
binPath = lib.makeBinPath [ cdrtools dvdauthor ffmpeg_3 imagemagick lame mjpegtools sox transcode vorbis-tools ];
|
2016-04-21 15:19:53 +01:00
|
|
|
|
2015-06-10 10:34:51 +01:00
|
|
|
wrapper = writeScript "dvd-slideshow.sh" ''
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2015-06-10 10:34:51 +01:00
|
|
|
# wrapper script for dvd-slideshow programs
|
2016-04-21 15:19:53 +01:00
|
|
|
export PATH=${binPath}:$PATH
|
2015-06-10 10:34:51 +01:00
|
|
|
|
|
|
|
dir=`dirname "$0"`
|
|
|
|
exe=`basename "$0"`
|
|
|
|
case "$exe" in
|
|
|
|
dvd-slideshow)
|
|
|
|
# use mpeg2enc by default as ffmpeg is known to crash.
|
|
|
|
# run dvd-slideshow.ffmpeg to force ffmpeg.
|
|
|
|
"$dir/dvd-slideshow.real" -mpeg2enc $@
|
|
|
|
;;
|
|
|
|
|
|
|
|
dvd-slideshow.ffmpeg)
|
|
|
|
"$dir/dvd-slideshow.real" $@
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
"$dir/$exe.real" $@
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
'';
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dvd-slideshow";
|
2015-06-10 10:34:51 +01:00
|
|
|
version = "0.8.4-2";
|
2018-05-28 13:59:57 +01:00
|
|
|
|
2015-06-10 10:34:51 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/dvd-slideshow/files/${pname}-${version}.tar.gz";
|
2015-06-10 10:34:51 +01:00
|
|
|
sha256 = "17c09aqvippiji2sd0pcxjg3nb1mnh9k5nia4gn5lhcvngjcp1q5";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# fix upstream typos
|
|
|
|
substituteInPlace dvd-slideshow \
|
|
|
|
--replace "version='0.8.4-1'" "version='0.8.4-2'" \
|
2016-10-01 10:17:30 +01:00
|
|
|
--replace "mymyecho" "myecho"
|
2015-06-10 10:34:51 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp dvd-slideshow "$out/bin/dvd-slideshow.real"
|
|
|
|
cp dvd-menu "$out/bin/dvd-menu.real"
|
|
|
|
cp dir2slideshow "$out/bin/dir2slideshow.real"
|
|
|
|
cp gallery1-to-slideshow "$out/bin/gallery1-to-slideshow.real"
|
|
|
|
cp jigl2slideshow "$out/bin/jigl2slideshow.real"
|
|
|
|
|
|
|
|
cp ${wrapper} "$out/bin/dvd-slideshow.sh"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/dvd-slideshow"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/dvd-slideshow.ffmpeg"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/dvd-menu"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/dir2slideshow"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/gallery1-to-slideshow"
|
|
|
|
ln -s dvd-slideshow.sh "$out/bin/jigl2slideshow"
|
|
|
|
|
|
|
|
cp -a man "$out/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2015-06-10 12:02:09 +01:00
|
|
|
description = "Suite of command line programs that creates a slideshow-style video from groups of pictures";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://dvd-slideshow.sourceforge.net/wiki/Main_Page";
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = [ lib.maintainers.robbinch ];
|
2015-06-10 10:34:51 +01:00
|
|
|
};
|
|
|
|
}
|