nixpkgs/pkgs/applications/audio/musescore/darwin.nix
Jiajie Chen 0c0cb9dbe5 musescore: 2.1 -> 3.6.2.548020600 on darwin
- Release: https://github.com/musescore/MuseScore/releases/tag/v3.6.2
- Bump musescore to 3.6.2.548020600
- Update download url
- Change license to gpl3
2022-07-06 10:29:27 -03:00

37 lines
1 KiB
Nix

{ stdenv, lib, fetchurl, undmg }:
let
versionComponents = [ "3" "6" "2" "548020600" ];
appName = "MuseScore ${builtins.head versionComponents}";
in
with lib;
stdenv.mkDerivation rec {
pname = "musescore-darwin";
version = concatStringsSep "." versionComponents;
# The disk image contains the .app and a symlink to /Applications.
sourceRoot = "${appName}.app";
src = fetchurl {
url = "https://github.com/musescore/MuseScore/releases/download/v${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg";
sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0=";
};
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 lib; {
description = "Music notation and composition software";
homepage = "https://musescore.org/";
license = licenses.gpl3Only;
platforms = platforms.darwin;
maintainers = [];
};
}