keepass: 2.33 -> 2.34

+43 -11
+3 -3
pkgs/applications/misc/keepass/default.nix
··· 8 8 # plugin derivations in the Nix store and nowhere else. 9 9 with builtins; buildDotnetPackage rec { 10 10 baseName = "keepass"; 11 - version = "2.33"; 11 + version = "2.34"; 12 12 13 13 src = fetchurl { 14 14 url = "mirror://sourceforge/keepass/KeePass-${version}-Source.zip"; 15 - sha256 = "0n4rkx2awyq1gbqiby1lkf2zw82brji96s4fkjsahmci528a882i"; 15 + sha256 = "e3f184e4deddd1aa5ee2b52e2373c772d3f3975e5eddb2fd729eb27b437011aa"; 16 16 }; 17 17 18 18 sourceRoot = "."; ··· 20 20 buildInputs = [ unzip makeWrapper icoutils ]; 21 21 22 22 pluginLoadPathsPatch = 23 - let outputLc = toString (add 8 (length plugins)); 23 + let outputLc = toString (add 7 (length plugins)); 24 24 patchTemplate = readFile ./keepass-plugins.patch; 25 25 loadTemplate = readFile ./keepass-plugins-load.patch; 26 26 loads =
+1 -1
pkgs/applications/misc/keepass/keepass-plugins-load.patch
··· 1 - + m_pluginManager.LoadAllPlugins("$PATH$/lib/dotnet/keepass"); 1 + + m_pluginManager.LoadAllPlugins("$PATH$/lib/dotnet/keepass", SearchOption.TopDirectoryOnly, new string[] {});
+39 -7
pkgs/applications/misc/keepass/keepass-plugins.patch
··· 1 1 --- old/KeePass/Forms/MainForm.cs 2 2 +++ new/KeePass/Forms/MainForm.cs 3 - @@ -384,9 +384,$OUTPUT_LC$ @@ namespace KeePass.Forms 4 - m_pluginManager.Initialize(m_pluginDefaultHost); 5 - 3 + @@ -386,42 +386,$OUTPUT_LC$ @@ namespace KeePass.Forms 6 4 m_pluginManager.UnloadAllPlugins(); 7 - - if(AppPolicy.Current.Plugins) 8 - - m_pluginManager.LoadAllPlugins(UrlUtil.GetFileDirectory( 9 - - WinUtil.GetExecutable(), false, true)); 10 - + if(AppPolicy.Current.Plugins) { 5 + if(AppPolicy.Current.Plugins) 6 + { 7 + - string[] vExclNames = new string[] { 8 + - AppDefs.FileNames.Program, AppDefs.FileNames.XmlSerializers, 9 + - AppDefs.FileNames.NativeLib32, AppDefs.FileNames.NativeLib64, 10 + - AppDefs.FileNames.ShInstUtil 11 + - }; 12 + - 13 + - string strPlgRoot = UrlUtil.GetFileDirectory( 14 + - WinUtil.GetExecutable(), false, true); 15 + - m_pluginManager.LoadAllPlugins(strPlgRoot, SearchOption.TopDirectoryOnly, 16 + - vExclNames); 17 + - 18 + - if(!NativeLib.IsUnix()) 19 + - { 20 + - string strPlgSub = UrlUtil.EnsureTerminatingSeparator(strPlgRoot, 21 + - false) + AppDefs.PluginsDir; 22 + - m_pluginManager.LoadAllPlugins(strPlgSub, SearchOption.AllDirectories, 23 + - vExclNames); 24 + - } 25 + - else // Unix 26 + - { 27 + - try 28 + - { 29 + - DirectoryInfo diPlgRoot = new DirectoryInfo(strPlgRoot); 30 + - foreach(DirectoryInfo diSub in diPlgRoot.GetDirectories()) 31 + - { 32 + - if(diSub == null) { Debug.Assert(false); continue; } 33 + - 34 + - if(string.Equals(diSub.Name, AppDefs.PluginsDir, 35 + - StrUtil.CaseIgnoreCmp)) 36 + - m_pluginManager.LoadAllPlugins(diSub.FullName, 37 + - SearchOption.AllDirectories, vExclNames); 38 + - } 39 + - } 40 + - catch(Exception) { Debug.Assert(false); } 41 + - } 42 + - } 11 43 $DO_LOADS$+ } 12 44 13 45 // Delete old files *after* loading plugins (when timestamps