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