nixpkgs-suyu/pkgs/development/libraries/portmidi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Nix
Raw Normal View History

2022-02-15 13:41:35 +01:00
{ lib, stdenv, fetchFromGitHub, unzip, cmake, alsa-lib, Carbon, CoreAudio, CoreFoundation, CoreMIDI, CoreServices }:
stdenv.mkDerivation rec {
pname = "portmidi";
2022-02-23 15:16:37 +01:00
version = "2.0.3";
2022-02-15 13:41:35 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
2022-02-23 15:16:37 +01:00
sha256 = "sha256-bLGqi3b9FHBA43baNDT8jkPBQSXAUDfurQSJHLcy3AE=";
};
2022-02-15 13:41:35 +01:00
cmakeFlags = [
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release"
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release"
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release"
2021-08-10 08:04:34 +02:00
];
patches = [
2022-02-15 13:41:35 +01:00
# Add missing header include
./missing-header.diff
2021-08-10 08:04:34 +02:00
];
2021-08-10 08:04:34 +02:00
postInstall = let ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
ln -s libportmidi${ext} "$out/lib/libporttime${ext}"
'';
nativeBuildInputs = [ unzip cmake ];
2021-08-10 08:04:34 +02:00
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
] ++ lib.optionals stdenv.isDarwin [
Carbon CoreAudio CoreFoundation CoreMIDI CoreServices
];
hardeningDisable = [ "format" ];
2016-02-11 01:21:20 +01:00
2021-08-10 08:04:34 +02:00
meta = with lib; {
2022-02-15 13:41:35 +01:00
homepage = "https://github.com/PortMidi/portmidi";
description = "Platform independent library for MIDI I/O";
2021-08-10 08:04:34 +02:00
license = licenses.mit;
2022-02-11 05:45:03 +01:00
maintainers = with maintainers; [ emilytrau ];
2021-08-10 08:04:34 +02:00
platforms = platforms.unix;
};
}