2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "soxr";
|
|
|
|
version = "0.1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://sourceforge/soxr/soxr-${version}-Source.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
|
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
patches = [
|
|
|
|
# Remove once https://sourceforge.net/p/soxr/code/merge-requests/5/ is merged.
|
|
|
|
./arm64-check.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "doc" ]; # headers are just two and very small
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An audio resampling library";
|
|
|
|
homepage = "http://soxr.sourceforge.net";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|