nur-packages

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

bin.nix (1328B)


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