4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake
|
|
, mbelib, libsndfile, itpp
|
|
, portaudioSupport ? true, portaudio ? null
|
|
}:
|
|
|
|
assert portaudioSupport -> portaudio != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dsd";
|
|
version = "2018-07-01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "szechyjs";
|
|
repo = "dsd";
|
|
rev = "f175834e45a1a190171dff4597165b27d6b0157b";
|
|
sha256 = "0w4r13sxvjwacdwxr326zr6p77a8p6ny0g6im574jliw5j3shlhr";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
mbelib libsndfile itpp
|
|
] ++ stdenv.lib.optionals portaudioSupport [ portaudio ];
|
|
|
|
doCheck = true;
|
|
preCheck = ''
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
|
|
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Digital Speech Decoder";
|
|
longDescription = ''
|
|
DSD is able to decode several digital voice formats from discriminator
|
|
tap audio and synthesize the decoded speech. Speech synthesis requires
|
|
mbelib, which is a separate package.
|
|
'';
|
|
homepage = https://github.com/szechyjs/dsd;
|
|
license = licenses.gpl2;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ andrew-d ];
|
|
};
|
|
}
|