2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "pinentry-mac";
|
|
|
|
version = "0.9.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matthewbauer";
|
|
|
|
repo = "pinentry-mac";
|
|
|
|
rev = "6dfef256c8ea32d642fea847f27d800f024cf51e";
|
|
|
|
sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ xcbuildHook ];
|
|
|
|
buildInputs = [ libiconv ncurses Cocoa ];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
preBuild = ''
|
|
|
|
# Only build for what we care about (also allows arm64)
|
|
|
|
substituteInPlace pinentry-mac.xcodeproj/project.pbxproj \
|
|
|
|
--replace "i386 x86_64 ppc" "${stdenv.targetPlatform.darwinArch}"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/GPGTools/pinentry-mac";
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|