summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorMichal Rus <m@michalrus.com>2016-09-13 07:00:39 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-09-13 07:00:39 +0200
commit6846b22bb49d07574e6da3273c38305a765e136f (patch)
treefea2421b414c414cc3e3850678f0a7827b4ef8ad /pkgs/applications/audio
parent9b26cb92e3c9a6f9c28e68d194c3f015c9eabcd4 (diff)
downloadnixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar.gz
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar.bz2
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar.lz
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar.xz
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.tar.zst
nixpkgs-6846b22bb49d07574e6da3273c38305a765e136f.zip
squishyball: init at 19580 (#18354)
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/opusfile/default.nix4
-rw-r--r--pkgs/applications/audio/opusfile/include-multistream.patch12
-rw-r--r--pkgs/applications/audio/squishyball/default.nix48
-rw-r--r--pkgs/applications/audio/squishyball/gnu-screen.patch20
4 files changed, 83 insertions, 1 deletions
diff --git a/pkgs/applications/audio/opusfile/default.nix b/pkgs/applications/audio/opusfile/default.nix
index b55ea30bae0..4937d09e532 100644
--- a/pkgs/applications/audio/opusfile/default.nix
+++ b/pkgs/applications/audio/opusfile/default.nix
@@ -8,7 +8,9 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ openssl libogg libopus ];
+  buildInputs = [ openssl libogg ];
+  propagatedBuildInputs = [ libopus ];
+  patches = [ ./include-multistream.patch ];
 
   meta = {
     description = "High-level API for decoding and seeking in .opus files";
diff --git a/pkgs/applications/audio/opusfile/include-multistream.patch b/pkgs/applications/audio/opusfile/include-multistream.patch
new file mode 100644
index 00000000000..7c6dd847596
--- /dev/null
+++ b/pkgs/applications/audio/opusfile/include-multistream.patch
@@ -0,0 +1,12 @@
+diff -Naur a/include/opusfile.h b/include/opusfile.h
+--- a/include/opusfile.h	2014-04-29 19:07:09.000000000 +0200
++++ b/include/opusfile.h	2016-09-05 17:50:15.147553798 +0200
+@@ -107,7 +107,7 @@
+ # include <stdarg.h>
+ # include <stdio.h>
+ # include <ogg/ogg.h>
+-# include <opus_multistream.h>
++# include <opus/opus_multistream.h>
+ 
+ /**@cond PRIVATE*/
+ 
diff --git a/pkgs/applications/audio/squishyball/default.nix b/pkgs/applications/audio/squishyball/default.nix
new file mode 100644
index 00000000000..2022183f4a0
--- /dev/null
+++ b/pkgs/applications/audio/squishyball/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, autoreconfHook, fetchsvn, flac, libao, libvorbis, ncurses
+, opusfile, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  name = "squishyball-${rev}";
+  rev = "19580";
+
+  src = fetchsvn {
+    url = "https://svn.xiph.org/trunk/squishyball";
+    rev = rev;
+    sha256 = "013vq52q9z6kpg9iyc2jnb3m2gihcjblvwpg4yj4wy1q2c05pzqp";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ flac libao libvorbis ncurses opusfile ];
+
+  patches = [ ./gnu-screen.patch ];
+
+  postInstall = ''
+    # Why doesn’t this happen automagically?
+    mkdir -p $out/share/man/man1
+    cp squishyball.1 $out/share/man/man1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool to perform sample comparison testing on the command line";
+    longDescription = ''
+       squishyball is a simple command-line utility for performing
+       double-blind A/B, A/B/X or X/X/Y testing on the command line.
+       The user specifies two input files to be compared and uses the
+       keyboard during playback to flip between the randomized samples
+       to perform on-the-fly compar‐ isons.  After a predetermined
+       number of trials, squishyball prints the trial results to
+       stdout and exits.  Results (stdout) may be redirected to a file
+       without affecting interactive use of the terminal.
+
+       squishyball can also be used to perform casual, non-randomized
+       comparisons of groups of up to ten samples; this is the default
+       mode of operation.
+    '';
+    homepage = https://svn.xiph.org/trunk/squishyball;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/squishyball/gnu-screen.patch b/pkgs/applications/audio/squishyball/gnu-screen.patch
new file mode 100644
index 00000000000..addc30d604c
--- /dev/null
+++ b/pkgs/applications/audio/squishyball/gnu-screen.patch
@@ -0,0 +1,20 @@
+diff -Naur a/main.c b/main.c
+--- a/main.c	2016-09-06 13:37:32.259895631 +0200
++++ b/main.c	2016-09-07 01:41:51.014309863 +0200
+@@ -693,6 +693,11 @@
+     }
+ 
+     /* set up terminal */
++    if (!strncmp(getenv("TERM"), "screen", 6)) {
++      char term[256];
++      snprintf(term, sizeof(term), "xterm%s", getenv("TERM") + 6);
++      setenv("TERM", term, 1);
++    }
+     atexit(min_panel_remove);
+     panel_init(pcm, test_files, test_mode, start, end>0 ? end : len, len,
+                beep_mode, restart_mode, tests, running_score);
+@@ -1170,4 +1175,3 @@
+     fprintf(stderr,"Done.\n");
+   return 0;
+ }
+-