nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

bin.nix (1239B)


      1 { lib, stdenv, fetchurl, _7zz, unzip, makeWrapper, cudatext }:
      2 
      3 stdenv.mkDerivation (finalAttrs: {
      4   pname = "cudatext-bin";
      5   version = "1.210.0.0";
      6 
      7   src = {
      8     "aarch64-darwin" = fetchurl {
      9       url = "mirror://sourceforge/cudatext/cudatext-macos-cocoa-aarch64-${finalAttrs.version}.dmg.zip";
     10       hash = "sha256-w7ypX5tYtAXaEaJgKXqhgH2ORw3yUSg0lOS3RG4lTbY=";
     11     };
     12     "x86_64-darwin" = fetchurl {
     13       url = "mirror://sourceforge/cudatext/cudatext-macos-cocoa-amd64-${finalAttrs.version}.dmg.zip";
     14       hash = "sha256-9JQx1btljQ4/ybtEoBKQI00KOh9xp+7BEvuMhL2gKcw=";
     15     };
     16   }.${stdenv.hostPlatform.system};
     17 
     18   sourceRoot = ".";
     19 
     20   # APFS format is unsupported by undmg
     21   nativeBuildInputs = [ _7zz unzip makeWrapper ];
     22 
     23   installPhase = ''
     24     runHook preInstall
     25 
     26     7zz x *.dmg
     27     mkdir -p $out/Applications
     28     mv *.app $out/Applications
     29     makeWrapper $out/{Applications/CudaText.app/Contents/MacOS,bin}/cudatext
     30 
     31     runHook postInstall
     32   '';
     33 
     34   meta = with lib; {
     35     inherit (cudatext.meta) description homepage changelog license;
     36     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     37     platforms = [ "aarch64-darwin" "x86_64-darwin" ];
     38     maintainers = [ maintainers.sikmir ];
     39     skip.ci = true;
     40   };
     41 })