diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-06-04 21:27:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-06-04 21:27:03 +0000 |
commit | 5487bcdfdd2c750274761263f3d65c00d7f6897b (patch) | |
tree | 6584bf52d6b70a59e10cd8eef51280f42ad2afa8 /pkgs/applications/audio/mmlgui/default.nix | |
parent | 8b9edf1e0fa01a9de7db6ead1b7b28f23b91b3e2 (diff) | |
parent | 1623d81e507520b5207307bc2bf8cfcddf90944a (diff) | |
download | nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar.gz nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar.bz2 nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar.lz nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar.xz nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.tar.zst nixpkgs-5487bcdfdd2c750274761263f3d65c00d7f6897b.zip |
Rebase onto 236cc2971ac72acd90f0ae3a797f9f83098b17ec
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/applications/audio/mmlgui/default.nix')
-rw-r--r-- | pkgs/applications/audio/mmlgui/default.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/applications/audio/mmlgui/default.nix b/pkgs/applications/audio/mmlgui/default.nix new file mode 100644 index 00000000000..0a29b7aad93 --- /dev/null +++ b/pkgs/applications/audio/mmlgui/default.nix @@ -0,0 +1,87 @@ +{ stdenv +, lib +, fetchFromGitHub +, unstableGitUpdater +, pkg-config +, glfw +, libvgm +, libX11 +, libXau +, libXdmcp +, Carbon +, Cocoa +, cppunit +}: + +stdenv.mkDerivation rec { + pname = "mmlgui"; + version = "unstable-2022-05-24"; + + src = fetchFromGitHub { + owner = "superctr"; + repo = "mmlgui"; + rev = "fe2b298c1eddae4cc38096f6c1ba1ccaed562cf1"; + fetchSubmodules = true; + sha256 = "Q34zzZthdThMbduXcc/qMome89mAMrn1Vinr073u4zo="; + }; + + postPatch = '' + # Actually wants pkgconf but that seems abit broken: + # https://github.com/NixOS/nixpkgs/pull/147503#issuecomment-1055943897 + # Removing a pkgconf-specific option makes it work with pkg-config + substituteInPlace libvgm.mak \ + --replace '--with-path=/usr/local/lib/pkgconfig' "" + substituteInPlace Makefile \ + --replace 'all: $(MMLGUI_BIN) test' 'all: $(MMLGUI_BIN)' + ''; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + glfw + libvgm + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + libX11 + libXau + libXdmcp + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + Carbon + Cocoa + ]; + + checkInputs = [ + cppunit + ]; + + makeFlags = [ + "RELEASE=1" + ]; + + enableParallelBuilding = true; + + doCheck = true; + + installPhase = '' + runHook preInstall + + install -Dm755 {,$out/}bin/mmlgui + mkdir -p $out/share/ctrmml + mv ctrmml/sample $out/share/ctrmml/ + + runHook postInstall + ''; + + passthru.updateScript = unstableGitUpdater { + url = "https://github.com/superctr/mmlgui.git"; + }; + + meta = with lib; { + homepage = "https://github.com/superctr/mmlgui"; + description = "MML (Music Macro Language) editor and compiler GUI, powered by the ctrmml framework"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.all; + }; +} |