summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobbin C <robbinch33@gmail.com>2015-06-10 17:34:51 +0800
committerRobbin C <robbinch33@gmail.com>2015-06-10 17:34:51 +0800
commit085a0e8d242765c1ab348f12cd606c281223fc73 (patch)
treea5683f70a69dc0dd36c8dce28980cf710fb19bd3 /pkgs
parent48381b7621a51512fa0a87f019d5d5915d9f3d20 (diff)
downloadnixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar.gz
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar.bz2
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar.lz
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar.xz
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.tar.zst
nixlib-085a0e8d242765c1ab348f12cd606c281223fc73.zip
dvd-slideshow: Add package.
This adds dvd-slideshow, a suite of command line programs that creates a
slideshow-style video from groups of pictures.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/video/dvd-slideshow/default.nix69
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/applications/video/dvd-slideshow/default.nix b/pkgs/applications/video/dvd-slideshow/default.nix
new file mode 100644
index 000000000000..94e19cb73274
--- /dev/null
+++ b/pkgs/applications/video/dvd-slideshow/default.nix
@@ -0,0 +1,69 @@
+{ stdenv, fetchurl, writeScript, cdrtools, dvdauthor, ffmpeg, imagemagick, lame, mjpegtools, sox, transcode, vorbisTools }:
+
+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
+
+      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 {
+  name = "dvd-slideshow";
+  version = "0.8.4-2";
+  src = fetchurl {
+    url = "mirror://sourceforge/dvd-slideshow/files/${name}-${version}.tar.gz";
+    sha256 = "17c09aqvippiji2sd0pcxjg3nb1mnh9k5nia4gn5lhcvngjcp1q5";
+  };
+
+  patchPhase = ''
+    # fix upstream typos
+    substituteInPlace dvd-slideshow \
+      --replace "version='0.8.4-1'" "version='0.8.4-2'" \
+      --replace "mymyecho" "myecho" 
+  '';
+
+  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 = {
+    description = "Suite of command line programs that creates a slideshow-style video from groups of pictures.";
+    homepage = http://dvd-slideshow.sourceforge.net/wiki/Main_Page;
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.robbinch ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4a20518363ef..58dce0a4f205 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10767,6 +10767,8 @@ let
 
   dvdauthor = callPackage ../applications/video/dvdauthor { };
 
+  dvd-slideshow = callPackage ../applications/video/dvd-slideshow { };
+
   dwb = callPackage ../applications/networking/browsers/dwb { dconf = gnome3.dconf; };
 
   dwbWrapper = wrapFirefox