mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 16:46:09 +00:00
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
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, libjack2, alsaLib
|
|
, freetype, libX11, libXrandr, libXinerama, libXext, libXcursor
|
|
, fetchpatch, fmt
|
|
, adlplugChip ? "-DADLplug_CHIP=OPL3"
|
|
, pname ? "ADLplug" }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
inherit pname;
|
|
version = "1.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jpcima";
|
|
repo = "ADLplug";
|
|
rev = "v${version}";
|
|
sha256 = "0mqx4bzri8s880v7jwd24nb93m5i3aklqld0b3h0hjnz0lh2qz0f";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://raw.githubusercontent.com/jpcima/ADLplug/83636c55bec1b86cabf634b9a6d56d07f00ecc61/resources/patch/juce-gcc9.patch";
|
|
sha256 = "15hkdb76n9lgjsrpczj27ld9b4804bzrgw89g95cj4sc8wwkplyy";
|
|
extraPrefix = "thirdparty/JUCE/";
|
|
stripLen = 1;
|
|
})
|
|
];
|
|
|
|
cmakeFlags = [ adlplugChip "-DADLplug_USE_SYSTEM_FMT=ON" ];
|
|
|
|
buildInputs = [
|
|
libjack2 alsaLib freetype libX11 libXrandr libXinerama libXext
|
|
libXcursor
|
|
];
|
|
nativeBuildInputs = [ cmake pkgconfig fmt ];
|
|
|
|
meta = with lib; {
|
|
description = "OPL3 and OPN2 FM Chip Synthesizer";
|
|
homepage = src.meta.homepage;
|
|
license = licenses.boost;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ gnidorah ];
|
|
};
|
|
}
|