From d4681bf62672083f92545e02e00b8cf040247e8d Mon Sep 17 00:00:00 2001 From: obadz Date: Fri, 22 May 2015 14:25:02 +0100 Subject: Lay down the foundation for packaging the .NET echosystem - fetchNuGet can fetch binaries from nuget servers - buildDotnetPackage can build .NET packages using mono/xbuild - Places nuget & paket as they would clash with nix - Patch project files because F# targets are expected to be found in the mono directory (and we know that's not going to happen on nix) - Find DLLs that were copied from buildInputs and replace by symlink for sharing - Export produced DLL via the pkg-config mechanism - Create wrappers for produced EXEs - Repackaged this new infrastructure: keepass, monodevelop - Newly packaged: ExtCore, UnionArgParser, FSharp.Data, Paket, and a bunch more.. This is a combination of 73 commits. --- pkgs/applications/misc/keepass/default.nix | 30 +++++----- pkgs/applications/misc/keepass/keepass.patch | 89 ++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 15 deletions(-) create mode 100644 pkgs/applications/misc/keepass/keepass.patch (limited to 'pkgs/applications/misc/keepass') diff --git a/pkgs/applications/misc/keepass/default.nix b/pkgs/applications/misc/keepass/default.nix index d46efc4e5e89..f659e4f6c2dd 100644 --- a/pkgs/applications/misc/keepass/default.nix +++ b/pkgs/applications/misc/keepass/default.nix @@ -1,17 +1,21 @@ -{ stdenv, fetchurl, unzip, makeDesktopItem, mono }: +{ stdenv, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem }: -stdenv.mkDerivation rec { - name = "keepass-${version}"; +buildDotnetPackage rec { + baseName = "keepass"; version = "2.29"; src = fetchurl { - url = "mirror://sourceforge/keepass/KeePass-${version}.zip"; - sha256 = "16x7m899akpi036c0wlr41w7fz9q0b69yac9q97rqkixb03l4g9d"; + url = "mirror://sourceforge/keepass/KeePass-${version}-Source.zip"; + sha256 = "051s0aznyyhbpdbly6h5rs0ax0zvkp45dh93nmq6lwhicswjwn5m"; }; sourceRoot = "."; - phases = [ "unpackPhase" "installPhase" ]; + buildInputs = [ unzip ]; + + patches = [ ./keepass.patch ]; + + preConfigure = "rm -rvf Build/*"; desktopItem = makeDesktopItem { name = "keepass"; @@ -22,23 +26,19 @@ stdenv.mkDerivation rec { categories = "Application;Other;"; }; + outputFiles = [ "Build/KeePass/Release/*" "Build/KeePassLib/Release/*" ]; + dllFiles = [ "KeePassLib.dll" ]; + exeFiles = [ "KeePass.exe" ]; - installPhase = '' - mkdir -p "$out/bin" - echo "${mono}/bin/mono $out/KeePass.exe" > $out/bin/keepass - chmod +x $out/bin/keepass - echo $out - cp -r ./* $out/ + postInstall = '' mkdir -p "$out/share/applications" cp ${desktopItem}/share/applications/* $out/share/applications ''; - buildInputs = [ unzip ]; - meta = { description = "GUI password manager with strong cryptography"; homepage = http://www.keepass.info/; - maintainers = with stdenv.lib.maintainers; [amorsillo]; + maintainers = with stdenv.lib.maintainers; [ amorsillo obadz ]; platforms = with stdenv.lib.platforms; all; license = stdenv.lib.licenses.gpl2; }; diff --git a/pkgs/applications/misc/keepass/keepass.patch b/pkgs/applications/misc/keepass/keepass.patch new file mode 100644 index 000000000000..6ecf0bb074de --- /dev/null +++ b/pkgs/applications/misc/keepass/keepass.patch @@ -0,0 +1,89 @@ +diff -Naur old/KeePass/KeePass.csproj new/KeePass/KeePass.csproj +--- old/KeePass/KeePass.csproj 2015-04-10 11:00:46.000000000 +0100 ++++ new/KeePass/KeePass.csproj 2015-05-27 16:35:52.196177593 +0100 +@@ -1,4 +1,4 @@ +- ++ + + Debug + AnyCPU +@@ -10,7 +10,7 @@ + KeePass + KeePass + KeePass.ico +- true ++ false + KeePass.pfx + + +@@ -1316,6 +1316,5 @@ + + --> + +- "$(FrameworkSDKDir)bin\sgen.exe" /assembly:"$(TargetPath)" /force /nologo /compiler:/keycontainer:VS_KEY_33430356D8D7D1B8 /compiler:/delaysign- + +- +\ No newline at end of file ++ +diff -Naur old/KeePassLib/KeePassLib.csproj new/KeePassLib/KeePassLib.csproj +--- old/KeePassLib/KeePassLib.csproj 2014-05-08 15:00:24.000000000 +0100 ++++ new/KeePassLib/KeePassLib.csproj 2015-05-27 16:35:52.197177562 +0100 +@@ -1,4 +1,4 @@ +- ++ + + Debug + AnyCPU +@@ -9,7 +9,7 @@ + Properties + KeePassLib + KeePassLib +- true ++ false + KeePassLib.pfx + + +diff -Naur old/KeePass.sln new/KeePass.sln +--- old/KeePass.sln 2009-08-31 19:47:28.000000000 +0100 ++++ new/KeePass.sln 2015-05-27 16:35:59.568953518 +0100 +@@ -1,11 +1,9 @@ +-Microsoft Visual Studio Solution File, Format Version 10.00 ++Microsoft Visual Studio Solution File, Format Version 12.00 + # Visual Studio 2008 + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLib", "KeePassLib\KeePassLib.csproj", "{53573E4E-33CB-4FDB-8698-C95F5E40E7F3}" + EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePass", "KeePass\KeePass.csproj", "{10938016-DEE2-4A25-9A5A-8FD3444379CA}" + EndProject +-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLibSD", "KeePassLibSD\KeePassLibSD.csproj", "{DC15F71A-2117-4DEF-8C10-AA355B5E5979}" +-EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrlUtil", "Translation\TrlUtil\TrlUtil.csproj", "{B7E890E7-BF50-4450-9A52-C105BD98651C}" + EndProject + Global +@@ -44,18 +42,6 @@ + {10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|Win32.ActiveCfg = Release|Any CPU + {10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|x64.ActiveCfg = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Win32.ActiveCfg = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|x64.ActiveCfg = Debug|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Any CPU.ActiveCfg = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Any CPU.Build.0 = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Mixed Platforms.Build.0 = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Win32.ActiveCfg = Release|Any CPU +- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|x64.ActiveCfg = Release|Any CPU + {B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU +diff -Naur old/Translation/TrlUtil/TrlUtil.csproj new/Translation/TrlUtil/TrlUtil.csproj +--- old/Translation/TrlUtil/TrlUtil.csproj 2013-07-21 10:06:38.000000000 +0100 ++++ new/Translation/TrlUtil/TrlUtil.csproj 2015-05-27 16:35:52.197177562 +0100 +@@ -1,4 +1,4 @@ +- ++ + + Debug + AnyCPU -- cgit 1.4.1