about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/pinentry/mac.nix
blob: 9c328d472c4bd1b30255fab27879b782ec2bbd65 (plain) (blame)
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
32
{ lib, stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }:

stdenv.mkDerivation {
  pname = "pinentry-mac";
  version = "0.9.4";

  src = fetchFromGitHub {
    owner = "matthewbauer";
    repo = "pinentry-mac";
    rev = "6dfef256c8ea32d642fea847f27d800f024cf51e";
    sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
  };

  nativeBuildInputs = [ xcbuildHook ];
  buildInputs = [ libiconv ncurses Cocoa ];

  installPhase = ''
    mkdir -p $out/Applications
    mv Products/Release/pinentry-mac.app $out/Applications
  '';

  passthru = {
    binaryPath = "Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac";
  };

  meta = {
    description = "Pinentry for GPG on Mac";
    license = lib.licenses.gpl2Plus;
    homepage = "https://github.com/GPGTools/pinentry-mac";
    platforms = lib.platforms.darwin;
  };
}