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