python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / portmidi / default.nix
blobf661ac0e40bcdc9bc1e21111c15ddc057c822260
1 { lib, stdenv, fetchFromGitHub, unzip, cmake, alsa-lib, Carbon, CoreAudio, CoreFoundation, CoreMIDI, CoreServices }:
3 stdenv.mkDerivation rec {
4   pname = "portmidi";
5   version = "2.0.3";
7   src = fetchFromGitHub {
8     owner = pname;
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-bLGqi3b9FHBA43baNDT8jkPBQSXAUDfurQSJHLcy3AE=";
12   };
14   cmakeFlags = [
15     "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release"
16     "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release"
17     "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release"
18   ];
20   patches = [
21     # Add missing header include
22     ./missing-header.diff
23   ];
25   postInstall = let ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
26     ln -s libportmidi${ext} "$out/lib/libporttime${ext}"
27   '';
29   nativeBuildInputs = [ unzip cmake ];
30   buildInputs = lib.optionals stdenv.isLinux [
31     alsa-lib
32   ] ++ lib.optionals stdenv.isDarwin [
33     Carbon CoreAudio CoreFoundation CoreMIDI CoreServices
34   ];
36   hardeningDisable = [ "format" ];
38   meta = with lib; {
39     homepage = "https://github.com/PortMidi/portmidi";
40     description = "Platform independent library for MIDI I/O";
41     license = licenses.mit;
42     maintainers = with maintainers; [ emilytrau ];
43     platforms = platforms.unix;
44   };