-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpkg.nix
More file actions
31 lines (26 loc) · 997 Bytes
/
pkg.nix
File metadata and controls
31 lines (26 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ rust-bin, lib, makeRustPlatform, symlinkJoin, makeWrapper, pkgs, runCommand, ... }:
let
rustPlatform = makeRustPlatform {
cargo = rust-bin.stable.latest.default;
rustc = rust-bin.stable.latest.default;
};
keepass-pinentry-unwrapped =rustPlatform.buildRustPackage {
pname = "pinentry-keepassxc";
version = "0.3.1";
src = ./.;
cargoHash = "sha256-dsQGzNfo4YukGhPAXaMfF+UZnAUTWoVJSUwTXMspu7M=";
meta = with lib; {
description = "A pinentry program that reads from your keepass database";
license = licenses.mit;
platforms = lib.lists.intersectLists lib.platforms.linux lib.platforms.x86_64;
mainProgram = "pinentry-keepassxc";
};
};
in
runCommand keepass-pinentry-unwrapped.name {
inherit (keepass-pinentry-unwrapped) pname version meta;
nativeBuildInputs = [makeWrapper];
} ''
makeWrapper ${keepass-pinentry-unwrapped}/bin/pinentry-keepassxc $out/bin/pinentry-keepassxc \
--prefix PATH : "${lib.makeBinPath [pkgs.pinentry-all]}"
''