nur-packages

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

package.nix (1469B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchurl,
      5   unzip,
      6   wine,
      7   makeWrapper,
      8   withExLexer ? true,
      9 }:
     10 let
     11   exlexer = fetchurl {
     12     url = "mirror://sourceforge/synwrite-addons/PyPlugins/plugin.Alexey.ExLexer.zip";
     13     hash = "sha256-O9wOglJp4XExWV8ODoVra3VyaqRmhB51/tupRmqDdqY=";
     14   };
     15 in
     16 stdenv.mkDerivation rec {
     17   pname = "synwrite";
     18   version = "6.41.2780";
     19 
     20   src = fetchurl {
     21     urls = [
     22       "mirror://sourceforge/synwrite/Release/SynWrite.${version}.zip"
     23       "http://uvviewsoft.com/synwrite/files/SynWrite.${version}.zip"
     24     ];
     25     hash = "sha256-/WleyQoo98RLX1MJGVjjlPmZJHxiCV4ulrb1eqNHOZ8=";
     26   };
     27 
     28   sourceRoot = ".";
     29 
     30   nativeBuildInputs = [
     31     unzip
     32     makeWrapper
     33   ];
     34 
     35   installPhase = ''
     36     mkdir -p $out/opt/synwrite
     37     cp -r . $out/opt/synwrite
     38 
     39     makeWrapper ${wine}/bin/wine $out/bin/synwrite \
     40       --run "[ -d \$HOME/.synwrite ] || { cp -r $out/opt/synwrite \$HOME/.synwrite && chmod -R +w \$HOME/.synwrite; }" \
     41       --add-flags "\$HOME/.synwrite/Syn.exe"
     42   ''
     43   + lib.optionalString withExLexer ''
     44     unzip ${exlexer} -d $out/opt/synwrite/Py/syn_exlexer
     45   '';
     46 
     47   preferLocalBuild = true;
     48 
     49   meta = {
     50     description = "Advanced text editor for programmers and Notepad replacement";
     51     homepage = "https://cudatext.github.io/synwrite/";
     52     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
     53     license = lib.licenses.mpl11;
     54     maintainers = [ lib.maintainers.sikmir ];
     55     platforms = lib.platforms.all;
     56     skip.ci = true;
     57   };
     58 }