btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / no / nova-filters / package.nix
blob17d90c6d310b22a482410972b9222c1fd7351561
1 { lib
2 , stdenv
3 , fetchurl
4 , scons
5 , boost
6 , ladspaH
7 }:
9 stdenv.mkDerivation (finalAttrs: {
10   pname = "nova-filters";
11   version = "0.2-2";
13   src = fetchurl {
14     url = "https://klingt.org/~tim/nova-filters/nova-filters_${finalAttrs.version}.tar.gz";
15     hash = "sha256-0WgxMDjhx2b39FKRwLrm8LrTO5nS0xE7+bRwQfcmBpg=";
16   };
18   postPatch = ''
19     substituteInPlace SConstruct \
20       --replace "'TERM' : os.environ['TERM']," "" \
21       --replace "Options" "Variables" \
22       --replace "-fomit-frame-pointer -ffast-math -mfpmath=sse" "-I${boost.dev}/include -I${ladspaH}/include" \
23       --replace "env.has_key('cxx')" "True" \
24       --replace "env['cxx']" "'${stdenv.cc.targetPrefix}c++'" \
25       --replace "-Wl,--strip-all" ""
27     substituteInPlace filters.cpp \
28       --replace "LADSPA_HINT_SAMPLE_RATE, 0, 0.5" "LADSPA_HINT_SAMPLE_RATE, 0.0001, 0.5"
30     substituteInPlace nova/source/dsp/filter.hpp \
31       --replace "= check" "= detail::filter_base<internal_type, checked>::check"
33     substituteInPlace nova/source/primitives/float.hpp \
34       --replace "boost/detail/endian.hpp" "boost/predef/other/endian.h" \
35       --replace "BOOST_LITTLE_ENDIAN" "BOOST_ENDIAN_LITTLE_BYTE"
36   '';
38   nativeBuildInputs = [
39     scons
40   ];
42   meta = with lib; {
43     description = "LADSPA plugins based on filters of nova";
44     homepage = "http://klingt.org/~tim/nova-filters/";
45     license = licenses.gpl2Plus;
46     maintainers = [ maintainers.magnetophon ];
47     platforms = platforms.unix;
48   };