Commit 3d121486 authored by Anderson Torres's avatar Anderson Torres
Browse files

libremidi: refactor

- finalAttrs
- nixfmt-rfc-style
- adopted by AndersonTorres
parent aff7901e
Loading
Loading
Loading
Loading
+26 −19
Original line number Diff line number Diff line
{ alsa-lib
, cmake
, darwin
, fetchFromGitHub
, lib
, stdenv
{
  lib,
  alsa-lib,
  cmake,
  darwin,
  fetchFromGitHub,
  stdenv,
}:

let
@@ -11,22 +12,28 @@ let
    CoreAudio
    CoreFoundation
    CoreMIDI
    CoreServices;
    CoreServices
    ;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "libremidi";
  version = "4.4.0";

  src = fetchFromGitHub {
    owner = "jcelerier";
    repo = "libremidi";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-raVBJ75/UmM3P69s8VNUXRE/2jV4WqPIfI4eXaf6UEg=";
  };

  nativeBuildInputs = [ cmake ];
  nativeBuildInputs = [
    cmake
  ];

  buildInputs = lib.optional stdenv.hostPlatform.isLinux alsa-lib
  buildInputs =
    lib.optionals stdenv.hostPlatform.isLinux [
      alsa-lib
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      CoreAudio
      CoreFoundation
@@ -39,10 +46,10 @@ stdenv.mkDerivation rec {
  '';

  meta = {
    description = "Modern C++ MIDI real-time & file I/O library";
    homepage = "https://github.com/jcelerier/libremidi";
    maintainers = [ ];
    description = "Modern C++ MIDI real-time & file I/O library";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.all;
  };
}
})