package.nix (1419B)
1 { 2 lib, 3 stdenv, 4 fetchzip, 5 _7zz, 6 makeWrapper, 7 cudatext, 8 }: 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "cudatext-bin"; 12 version = "1.219.1.0"; 13 14 __structuredAttrs = true; 15 16 src = 17 { 18 "aarch64-darwin" = fetchzip { 19 url = "mirror://sourceforge/cudatext/cudatext-macos-cocoa-aarch64-${finalAttrs.version}.dmg.zip"; 20 hash = "sha256-z2kVRTI7O8l+bhGwHTGH7pL4BUkldaGnMJbaMj7RGiU="; 21 stripRoot = false; 22 }; 23 "x86_64-darwin" = fetchzip { 24 url = "mirror://sourceforge/cudatext/cudatext-macos-cocoa-amd64-${finalAttrs.version}.dmg.zip"; 25 hash = "sha256-P5b845iNTyfwmaG3uUgvjCyyd0RqqBAvFPGWyfwZDls="; 26 stripRoot = false; 27 }; 28 } 29 .${stdenv.hostPlatform.system}; 30 31 sourceRoot = "."; 32 33 # APFS format is unsupported by undmg 34 nativeBuildInputs = [ 35 _7zz 36 makeWrapper 37 ]; 38 unpackCmd = "7zz x $curSrc"; 39 40 installPhase = '' 41 runHook preInstall 42 43 mkdir -p $out/Applications 44 mv *.app $out/Applications 45 makeWrapper $out/{Applications/CudaText.app/Contents/MacOS,bin}/cudatext 46 47 runHook postInstall 48 ''; 49 50 meta = { 51 inherit (cudatext.meta) 52 description 53 homepage 54 changelog 55 license 56 ; 57 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 58 platforms = [ 59 "aarch64-darwin" 60 "x86_64-darwin" 61 ]; 62 maintainers = [ lib.maintainers.sikmir ]; 63 skip.ci = true; 64 }; 65 })
