about summary refs log tree commit diff
path: root/pkgs/applications/audio/baudline
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2015-02-15 14:57:16 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2015-10-23 09:44:07 +0200
commite8c22b33e6ca0d4b298f0a7dcb4208c0cbeb3ddf (patch)
tree689284b93e69036a2868136dfa14ff77e9acceed /pkgs/applications/audio/baudline
parenta924c55d0b868c7e9eb88934afcb477715e09c68 (diff)
baudline: init at 1.0.8
Baudline is a scientific signal analysis application.

I was unsure whether the baudline license allowed packaging in nixpkgs,
so I sent a copy of this nix expression (and some explanation) to their
support. I got this reply:

  From: Erik Olson <erik@sigblips.com>
  Subject: Re: Licensing question

  Hello Bjorn,

  This sounds fine.  What you suggest doing is very similar to how the
  FreeBSD FreshPorts system deals with baudline.

  Erik

So basically, everything is good as long as we only distribute the _expression_
to install the package. We must not distribute the package (binary).
Diffstat (limited to 'pkgs/applications/audio/baudline')
-rw-r--r--pkgs/applications/audio/baudline/default.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix
new file mode 100644
index 0000000000000..543329ef679b1
--- /dev/null
+++ b/pkgs/applications/audio/baudline/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, libXmu, libXt, libX11, libXext, libXxf86vm, jack
+, makeWrapper
+}:
+
+let
+  rpath = stdenv.lib.makeLibraryPath
+    [ libXmu libXt libX11 libXext libXxf86vm jack ];
+in
+stdenv.mkDerivation rec {
+  name = "baudline-${version}";
+  version = "1.08";
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz";
+        sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr";
+      }
+    else if stdenv.system == "i686-linux" then
+      fetchurl {
+        url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz";
+        sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb";
+      }
+    else
+      throw "baudline isn't supported (yet?) on ${stdenv.system}";
+
+  buildInputs = [ makeWrapper ];
+
+  # Prebuilt binary distribution.
+  # "patchelf --set-rpath" seems to break the application (cannot start), using
+  # LD_LIBRARY_PATH wrapper script instead.
+  buildPhase = "true";
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mkdir -p "$out/libexec/baudline"
+
+    cp -r . "$out/libexec/baudline/"
+
+    interpreter="$(echo ${stdenv.glibc}/lib/ld-linux*)"
+    for prog in "$out"/libexec/baudline/baudline*; do
+        patchelf --interpreter "$interpreter" "$prog"
+        ln -sr "$prog" "$out/bin/"
+    done
+    for prog in "$out"/bin/*; do
+        wrapProgram "$prog" --prefix LD_LIBRARY_PATH : ${rpath}
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Scientific signal analysis application";
+    longDescription = ''
+      Baudline is a time-frequency browser designed for scientific
+      visualization of the spectral domain.  Signal analysis is performed by
+      Fourier, correlation, and raster transforms that create colorful
+      spectrograms with vibrant detail.  Conduct test and measurement
+      experiments with the built in function generator, or play back audio
+      files with a multitude of effects and filters.  The baudline signal
+      analyzer combines fast digital signal processing, versatile high speed
+      displays, and continuous capture tools for hunting down and studying
+      elusive signal characteristics.
+    '';
+    homepage = http://www.baudline.com/;
+    # See http://www.baudline.com/faq.html#licensing_terms.
+    # (Do NOT (re)distribute on hydra.)
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.bjornfor ];
+  };
+
+}