summary refs log tree commit diff
path: root/pkgs/tools/security/pinentry-mac/default.nix
blob: 7116d1777d6daf0cf1c2f828505b5e18b4b5a2b1 (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
{ fetchurl, stdenv }:

stdenv.mkDerivation rec {
  name = "pinentry-mac-0.9.4";

  src = fetchurl {
    url = "https://github.com/GPGTools/pinentry-mac/archive/v0.9.4.tar.gz";
    sha256 = "037ebb010377d3a3879ae2a832cefc4513f5c397d7d887d7b86b4e5d9a628271";
  };

  postPatch = ''
    substituteInPlace ./Makefile --replace "xcodebuild" "/usr/bin/xcodebuild"
  '';

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

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

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