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