nixpkgs/pkgs/applications/audio/helm/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

80 lines
2 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, xorg
, freetype
, alsaLib
, curl
, libjack2
, lv2
, pkgconfig
, libGLU
, libGL
}:
stdenv.mkDerivation {
version = "0.9.0";
pname = "helm";
src = fetchFromGitHub {
owner = "mtytel";
repo = "helm";
rev = "927d2ed27f71a735c3ff2a1226ce3129d1544e7e";
sha256 = "17ys2vvhncx9i3ydg3xwgz1d3gqv4yr5mqi7vr0i0ca6nad6x3d4";
};
buildInputs = [
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
xorg.libXinerama xorg.libXrender xorg.libXrandr
freetype alsaLib curl libjack2 pkgconfig libGLU libGL lv2
];
CXXFLAGS = "-DHAVE_LROUND";
patches = [
# gcc9 compatibility https://github.com/mtytel/helm/pull/233
(fetchpatch {
url = "https://github.com/mtytel/helm/commit/cb611a80bd5a36d31bfc31212ebbf79aa86c6f08.patch";
sha256 = "1i2289srcfz17c3zzab6f51aznzdj62kk53l4afr32bkjh9s4ixk";
})
];
prePatch = ''
sed -i 's|usr/||g' Makefile
'';
buildPhase = ''
make lv2
make standalone
'';
installPhase = ''
make DESTDIR="$out" install
'';
meta = with lib; {
homepage = "http://tytel.org/helm";
description = "A free, cross-platform, polyphonic synthesizer";
longDescription = ''
A free, cross-platform, polyphonic synthesizer.
Features:
32 voice polyphony
Interactive visual interface
Powerful modulation system with live visual feedback
Dual oscillators with cross modulation and up to 15 oscillators each
Unison and Harmony mode for oscillators
Oscillator feedback and saturation for waveshaping
12 different waveforms
7 filter types with keytracking
2 monophonic and 1 polyphonic LFO
Step sequencer
Lots of modulation sources including polyphonic aftertouch
Simple arpeggiator
Effects: Formant filter, stutter, delay
'';
license = stdenv.lib.licenses.gpl3;
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
};
}