summary refs log tree commit diff
path: root/pkgs/applications/audio/caudec/default.nix
blob: a595f285c68a703799f6e3608e0929c165c200d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchurl, makeWrapper, bash, bc, findutils, flac, lame, opusTools, procps, sox }:

stdenv.mkDerivation rec {
  pname = "caudec";
  version = "1.7.5";

  src = fetchurl {
    url = "http://caudec.cocatre.net/downloads/caudec-${version}.tar.gz";
    sha256 = "5d1f5ab3286bb748bd29cbf45df2ad2faf5ed86070f90deccf71c60be832f3d5";
  };

  preBuild = ''
    patchShebangs ./install.sh
  '';

  nativeBuildInputs = [ bash makeWrapper ];

  installPhase = ''
    ./install.sh --prefix=$out/bin
  '';

  postFixup = ''
    for executable in $(cd $out/bin && ls); do
  wrapProgram $out/bin/$executable \
    --prefix PATH : "${lib.makeBinPath [ bc findutils sox procps opusTools lame flac ]}"
    done
  '';

   meta = with lib; {
    homepage = "https://caudec.cocatre.net/";
    description = "A multiprocess audio converter that supports many formats (FLAC, MP3, Ogg Vorbis, Windows codecs and many more)";
    license     = licenses.gpl3;
    platforms   = platforms.linux ++ platforms.darwin;
  };
}