about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix b/nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix
new file mode 100644
index 000000000000..e64632d529b1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/keepass-plugins/keepasshttp/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildEnv, fetchFromGitHub, mono }:
+
+let
+  version = "1.8.4.2";
+  drv = stdenv.mkDerivation {
+    name = "keepasshttp-${version}";
+    src = fetchFromGitHub {
+      owner = "pfn";
+      repo = "keepasshttp";
+      #rev = "${version}";
+      # for 1.8.4.2 the tag is at the wrong commit (they fixed stuff
+      # afterwards and didn't move the tag), hence reference by commitid
+      rev = "c2c4eb5388a02169400cba7a67be325caabdcc37";
+      sha256 = "0bkzxggbqx7sql3sp46bqham6r457in0vrgh3ai3lw2jrw79pwmh";
+    };
+
+    meta = {
+      description = "KeePass plugin to expose password entries securely (256bit AES/CBC) over HTTP";
+      homepage    = https://github.com/pfn/keepasshttp;
+      platforms   = with stdenv.lib.platforms; linux;
+      license     = stdenv.lib.licenses.gpl3;
+    };
+
+    pluginFilename = "KeePassHttp.plgx";
+
+    installPhase = ''
+      mkdir -p $out/lib/dotnet/keepass/
+      cp $pluginFilename $out/lib/dotnet/keepass/$pluginFilename
+    '';
+  };
+in
+  # Mono is required to compile plugin at runtime, after loading.
+  buildEnv { name = drv.name; paths = [ mono drv ]; }