nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, buildEnv, fetchurl, mono }:
2
3let
4 version = "1.0.4";
5
6 drv = stdenv.mkDerivation {
7 pname = "keepass-qrcodeview";
8 inherit version;
9
10 src = fetchurl {
11 url = "https://github.com/JanisEst/KeePassQRCodeView/releases/download/v${version}/KeePassQRCodeView.plgx";
12 sha256 = "e13c9f02bb0d79b479ca0e92490b822b5b88f49bb18ba2954d3bbe0808f46e6d";
13 };
14
15 dontUnpack = true;
16 installPhase = ''
17 mkdir -p $out/lib/dotnet/keepass/
18 cp $src $out/lib/dotnet/keepass/
19 '';
20
21 meta = with lib; {
22 description = "Enables KeePass to display data as QR code images";
23 longDescription = ''
24 KeePassQRCodeView is a plugin for KeePass 2.x which shows QR codes for entry fields.
25 These codes can be scanned to copy the encoded data to the scanner (smartphone, ...)
26 '';
27 homepage = "https://github.com/JanisEst/KeePassQRCodeView";
28 platforms = [
29 "aarch64-linux"
30 "i686-linux"
31 "x86_64-linux"
32 ];
33 license = licenses.mit;
34 maintainers = with maintainers; [ nazarewk ];
35 };
36 };
37in
38 # Mono is required to compile plugin at runtime, after loading.
39 buildEnv { name = drv.name; paths = [ mono drv ]; }