From 22404a068fa3ce2ed28b81a38d082a412eb0a91a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sun, 26 Feb 2017 02:59:20 -0600 Subject: [PATCH] musescore: add darwin-specific package This is basically a clone of the Homebrew cask version: https://github.com/caskroom/homebrew-cask/blob/master/Casks/musescore.rb --- pkgs/applications/audio/musescore/darwin.nix | 34 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/audio/musescore/darwin.nix diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix new file mode 100644 index 000000000000..160e84e10a1a --- /dev/null +++ b/pkgs/applications/audio/musescore/darwin.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, undmg }: + +let + major = "2"; + minor = "0.3"; + patch = "1"; + appName = "MuseScore ${major}"; +in + +stdenv.mkDerivation rec { + name = "musescore-darwin-${version}"; + version = "${major}.${minor}.${patch}"; + + src = fetchurl { + url = "ftp://ftp.osuosl.org/pub/musescore/releases/MuseScore-${major}.${minor}/MuseScore-${version}.dmg"; + sha256 = "0a9v2nc7sx2az7xpd9i7b84m7xk9zcydfpis5fj334r5yqds4rm1"; + }; + + buildInputs = [ undmg ]; + installPhase = '' + mkdir -p "$out/Applications/${appName}.app" + cp -R . "$out/Applications/${appName}.app" + chmod a+x "$out/Applications/${appName}.app/Contents/MacOS/mscore" + ''; + + meta = with stdenv.lib; { + description = "Music notation and composition software"; + homepage = https://musescore.org/; + license = licenses.gpl2; + platforms = platforms.darwin; + maintainers = with maintainers; [ yurrriq ]; + repositories.git = https://github.com/musescore/MuseScore; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e70ebe4cc7f3..f3dc69586dc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14542,7 +14542,11 @@ with pkgs; else null; }; - musescore = libsForQt55.callPackage ../applications/audio/musescore { }; + musescore = + if stdenv.isDarwin then + callPackage ../applications/audio/musescore/darwin.nix { } + else + libsForQt55.callPackage ../applications/audio/musescore { }; mutt = callPackage ../applications/networking/mailreaders/mutt { }; mutt-with-sidebar = callPackage ../applications/networking/mailreaders/mutt {