default.nix (1486B)
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 '' 37 mkdir -p $out/opt/synwrite 38 cp -r . $out/opt/synwrite 39 40 makeWrapper ${wine}/bin/wine $out/bin/synwrite \ 41 --run "[ -d \$HOME/.synwrite ] || { cp -r $out/opt/synwrite \$HOME/.synwrite && chmod -R +w \$HOME/.synwrite; }" \ 42 --add-flags "\$HOME/.synwrite/Syn.exe" 43 '' 44 + lib.optionalString withExLexer '' 45 unzip ${exlexer} -d $out/opt/synwrite/Py/syn_exlexer 46 ''; 47 48 preferLocalBuild = true; 49 50 meta = { 51 description = "Advanced text editor for programmers and Notepad replacement"; 52 homepage = "http://uvviewsoft.com/synwrite/"; 53 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 54 license = lib.licenses.mpl11; 55 maintainers = [ lib.maintainers.sikmir ]; 56 platforms = lib.platforms.all; 57 skip.ci = true; 58 }; 59 }