1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00
nixpkgs/pkgs/tools/misc/timidity/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

40 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, alsaLib, libjack2, ncurses, pkgconfig }:
stdenv.mkDerivation {
name = "timidity-2.15.0";
src = fetchurl {
url = "mirror://sourceforge/timidity/TiMidity++-2.15.0.tar.bz2";
sha256 = "1xf8n6dqzvi6nr2asags12ijbj1lwk1hgl3s27vm2szib8ww07qn";
};
patches = [ ./timidity-iA-Oj.patch ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ alsaLib libjack2 ncurses ];
configureFlags = [ "--enable-audio=oss,alsa,jack" "--enable-alsaseq" "--with-default-output=alsa" "--enable-ncurses" ];
NIX_LDFLAGS = "-ljack -L${libjack2}/lib";
instruments = fetchurl {
url = "http://www.csee.umbc.edu/pub/midia/instruments.tar.gz";
sha256 = "0lsh9l8l5h46z0y8ybsjd4pf6c22n33jsjvapfv3rjlfnasnqw67";
};
# the instruments could be compressed (?)
postInstall = ''
mkdir -p $out/share/timidity/;
cp ${./timidity.cfg} $out/share/timidity/timidity.cfg
tar --strip-components=1 -xf $instruments -C $out/share/timidity/
'';
meta = with lib; {
homepage = "https://sourceforge.net/projects/timidity/";
license = licenses.gpl2;
description = "A software MIDI renderer";
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux;
};
}