default.nix (1175B)
1 { 2 lib, 3 stdenv, 4 fetchfromgh, 5 unzip, 6 makeWrapper, 7 }: 8 9 stdenv.mkDerivation (finalAttrs: { 10 pname = "macsvg"; 11 version = "1.2.0"; 12 13 src = fetchfromgh { 14 owner = "dsward2"; 15 repo = "macSVG"; 16 name = "macSVG-v${lib.versions.majorMinor finalAttrs.version}.zip"; 17 hash = "sha256-wlEFUzFQ9fnSjmsIrCDzRvSZmfcK9V+go6pNYJOqN+w="; 18 version = "v${finalAttrs.version}"; 19 }; 20 21 sourceRoot = "."; 22 23 nativeBuildInputs = [ 24 unzip 25 makeWrapper 26 ]; 27 28 installPhase = '' 29 runHook preInstall 30 mkdir -p $out/Applications 31 mv macSVG_v${ 32 lib.replaceStrings [ "." ] [ "_" ] (lib.versions.majorMinor finalAttrs.version) 33 }/*.app $out/Applications 34 makeWrapper $out/{Applications/macSVG.app/Contents/MacOS/macSVG,bin/macsvg} 35 runHook postInstall 36 ''; 37 38 meta = { 39 description = "An open-source macOS app for designing HTML5 SVG"; 40 homepage = "https://macsvg.org/"; 41 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 42 license = lib.licenses.mit; 43 maintainers = [ lib.maintainers.sikmir ]; 44 platforms = [ 45 "aarch64-darwin" 46 "x86_64-darwin" 47 ]; 48 mainProgram = "macsvg"; 49 skip.ci = true; 50 }; 51 })