From 51a85842524f8010b8544f202c29b6b1e79871c1 Mon Sep 17 00:00:00 2001
From: Eric Bailey <yurrriq@users.noreply.github.com>
Date: Mon, 13 Nov 2017 16:47:28 -0600
Subject: [PATCH] musescore (darwin): 2.0.3 -> 2.1 (#26297)

---
 pkgs/applications/audio/musescore/darwin.nix | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix
index 160e84e10a1..e14594ae3b2 100644
--- a/pkgs/applications/audio/musescore/darwin.nix
+++ b/pkgs/applications/audio/musescore/darwin.nix
@@ -1,19 +1,19 @@
-{ stdenv, fetchurl, undmg }:
+{ stdenv, lib, fetchurl, undmg }:
 
 let
-  major = "2";
-  minor = "0.3";
-  patch = "1";
-  appName = "MuseScore ${major}";
+  versionComponents = [ "2" "1" ];
+  appName = "MuseScore ${builtins.head versionComponents}";
 in
 
+with lib;
+
 stdenv.mkDerivation rec {
   name = "musescore-darwin-${version}";
-  version = "${major}.${minor}.${patch}";
+  version = "${concatStringsSep "." versionComponents}";
 
   src = fetchurl {
-    url =  "ftp://ftp.osuosl.org/pub/musescore/releases/MuseScore-${major}.${minor}/MuseScore-${version}.dmg";
-    sha256 = "0a9v2nc7sx2az7xpd9i7b84m7xk9zcydfpis5fj334r5yqds4rm1";
+    url =  "ftp://ftp.osuosl.org/pub/musescore/releases/MuseScore-${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg";
+    sha256 = "19xkaxlkbrhvfip6n3iw6q7463ngr6y5gfisrpjqg2xl2igyl795";
   };
 
   buildInputs = [ undmg ];