From 4d5ee723545c4aac8cadd8fba3e8b8ee2d25fb04 Mon Sep 17 00:00:00 2001 From: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com> Date: Wed, 24 Nov 2021 21:48:44 +0100 Subject: [PATCH] keepass-charactercopy: init at 1.0.0 --- maintainers/maintainer-list.nix | 11 +++++ .../keepass-plugins/charactercopy/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 54 insertions(+) create mode 100644 pkgs/applications/misc/keepass-plugins/charactercopy/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3cb4c652e18..2a8852d64cb 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8166,6 +8166,17 @@ githubId = 56316606; name = "Amneesh Singh"; }; + nazarewk = { + name = "Krzysztof Nazarewski"; + email = "3494992+nazarewk@users.noreply.github.com"; + matrix = "@nazarewk:matrix.org"; + github = "nazarewk"; + githubId = 3494992; + keys = [{ + longkeyid = "rsa4096/0x916D8B67241892AE"; + fingerprint = "4BFF 0614 03A2 47F0 AA0B 4BC4 916D 8B67 2418 92AE"; + }]; + }; nbren12 = { email = "nbren12@gmail.com"; github = "nbren12"; diff --git a/pkgs/applications/misc/keepass-plugins/charactercopy/default.nix b/pkgs/applications/misc/keepass-plugins/charactercopy/default.nix new file mode 100644 index 00000000000..dbe203566f0 --- /dev/null +++ b/pkgs/applications/misc/keepass-plugins/charactercopy/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, buildEnv, fetchurl, mono }: + +let + version = "1.0.0"; + + drv = stdenv.mkDerivation { + pname = "keepass-charactercopy"; + inherit version; + + src = fetchurl { + url = "https://github.com/SketchingDev/Character-Copy/releases/download/v${version}/CharacterCopy.plgx"; + sha256 = "f8a81a60cd1aacc04c92a242479a8e4210452add019c52ebfbb1810b58d8800a"; + }; + + dontUnpack = true; + installPhase = '' + mkdir -p $out/lib/dotnet/keepass/ + cp $src $out/lib/dotnet/keepass/ + ''; + + meta = with lib; { + description = "Enables KeePass to copy individual characters by index"; + longDescription = '' + Character Copy is a lightweight KeePass plugin that integrates into KeePass' entry menu and + allows users to securely copy individual characters from + an entry's protected string fields, such as the password field + ''; + homepage = "https://github.com/SketchingDev/Character-Copy"; + platforms = [ + "aarch64-linux" + "i686-linux" + "x86_64-linux" + ]; + # licensing info was found in source files https://github.com/SketchingDev/Character-Copy/search?q=license + license = licenses.gpl2; + maintainers = with maintainers; [ nazarewk ]; + }; + }; +in + # Mono is required to compile plugin at runtime, after loading. + buildEnv { name = drv.name; paths = [ mono drv ]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a014b71668e..0ddd7803d5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24880,6 +24880,8 @@ with pkgs; keepass = callPackage ../applications/misc/keepass { }; + keepass-charactercopy = callPackage ../applications/misc/keepass-plugins/charactercopy { }; + keepass-keeagent = callPackage ../applications/misc/keepass-plugins/keeagent { }; keepass-keepasshttp = callPackage ../applications/misc/keepass-plugins/keepasshttp { };