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
This commit is contained in:
Eric Bailey 2017-02-26 02:59:20 -06:00
parent 52507b3a9b
commit 22404a068f
No known key found for this signature in database
GPG Key ID: 29E1B8D32C1635C4
2 changed files with 39 additions and 1 deletions

View File

@ -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;
};
}

View File

@ -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 {