summary refs log tree commit diff
path: root/pkgs/applications/misc/audio/soxr/default.nix
blob: f7c01ce4649401e5b630495008115e6572e4da4d (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, cmake }:

stdenv.mkDerivation rec {
  pname = "soxr";
  version = "0.1.3";

  src = fetchurl {
    url = "mirror://sourceforge/soxr/soxr-${version}-Source.tar.xz";
    sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
  };

  patches = [
    # Remove once https://sourceforge.net/p/soxr/code/merge-requests/5/ is merged.
    ./arm64-check.patch
  ];

  outputs = [ "out" "doc" ]; # headers are just two and very small

  preConfigure =
    if stdenv.isDarwin then ''
      export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}"`pwd`/build/src
    '' else ''
      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}"`pwd`/build/src
    '';

  nativeBuildInputs = [ cmake ];

  meta = with lib; {
    description = "An audio resampling library";
    homepage = "http://soxr.sourceforge.net";
    license = licenses.lgpl21Plus;
    platforms = platforms.unix;
    maintainers = with maintainers; [ ];
  };
}