2018-02-24 17:51:04 -08:00
|
|
|
{ stdenv, buildPackages, fetchurl, gettext
|
2018-02-24 18:34:54 -08:00
|
|
|
, hostPlatform, genPosixLockObjOnly ? false
|
2018-02-24 17:51:04 -08:00
|
|
|
}: let
|
|
|
|
genPosixLockObjOnlyAttrs = stdenv.lib.optionalAttrs genPosixLockObjOnly {
|
|
|
|
buildPhase = ''
|
|
|
|
cd src
|
|
|
|
make gen-posix-lock-obj
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m755 gen-posix-lock-obj $out/bin
|
|
|
|
'';
|
2005-12-19 02:34:01 -08:00
|
|
|
|
2018-02-24 17:51:04 -08:00
|
|
|
outputs = [ "out" ];
|
|
|
|
outputBin = "out";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation (rec {
|
2016-06-23 00:34:35 -07:00
|
|
|
name = "libgpg-error-${version}";
|
2017-03-02 01:07:59 -08:00
|
|
|
version = "1.27";
|
2009-01-12 11:13:34 -08:00
|
|
|
|
2005-12-19 02:34:01 -08:00
|
|
|
src = fetchurl {
|
2009-01-12 11:13:34 -08:00
|
|
|
url = "mirror://gnupg/libgpg-error/${name}.tar.bz2";
|
2017-03-02 01:07:59 -08:00
|
|
|
sha256 = "1li95ni122fzinzlmxbln63nmgij63irxfvi52ws4zfbzv3am4sg";
|
2005-12-19 02:34:01 -08:00
|
|
|
};
|
2009-01-12 11:13:34 -08:00
|
|
|
|
2018-02-24 18:34:54 -08:00
|
|
|
patches = if hostPlatform.isRiscV then ./riscv.patch else null;
|
|
|
|
|
2018-01-30 16:19:23 -08:00
|
|
|
postPatch = ''
|
|
|
|
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
|
|
|
|
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
|
|
|
|
'';
|
2014-11-01 12:18:45 -07:00
|
|
|
|
2016-08-28 17:30:01 -07:00
|
|
|
outputs = [ "out" "dev" "info" ];
|
2015-10-11 12:59:52 -07:00
|
|
|
outputBin = "dev"; # deps want just the lib, most likely
|
|
|
|
|
2014-09-13 12:44:45 -07:00
|
|
|
# If architecture-dependent MO files aren't available, they're generated
|
2014-03-03 13:22:12 -08:00
|
|
|
# during build, so we need gettext for cross-builds.
|
2018-01-23 09:38:46 -08:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [ gettext ];
|
2014-03-03 13:22:12 -08:00
|
|
|
|
2014-11-01 12:18:45 -07:00
|
|
|
postConfigure =
|
|
|
|
stdenv.lib.optionalString stdenv.isSunOS
|
|
|
|
# For some reason, /bin/sh on OpenIndiana leads to this at the end of the
|
|
|
|
# `config.status' run:
|
|
|
|
# ./config.status[1401]: shift: (null): bad number
|
|
|
|
# (See <http://hydra.nixos.org/build/2931046/nixlog/1/raw>.)
|
|
|
|
# Thus, re-run it with Bash.
|
|
|
|
"${stdenv.shell} config.status";
|
2009-01-12 11:13:34 -08:00
|
|
|
|
2018-01-23 09:38:46 -08:00
|
|
|
doCheck = true; # not cross
|
2014-04-08 16:15:38 -07:00
|
|
|
|
2015-10-11 12:59:52 -07:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 13:03:30 -07:00
|
|
|
homepage = https://www.gnupg.org/related_software/libgpg-error/index.html;
|
2014-09-21 10:43:57 -07:00
|
|
|
description = "A small library that defines common error values for all GnuPG components";
|
2009-01-12 11:13:34 -08:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Libgpg-error is a small library that defines common error values
|
|
|
|
for all GnuPG components. Among these are GPG, GPGSM, GPGME,
|
|
|
|
GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
|
|
|
|
Daemon and possibly more in the future.
|
|
|
|
'';
|
|
|
|
|
2015-10-11 12:59:52 -07:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.all;
|
2016-06-23 00:34:35 -07:00
|
|
|
maintainers = [ maintainers.fuuzetsu maintainers.vrthra ];
|
2011-11-01 15:38:05 -07:00
|
|
|
};
|
2018-02-24 17:51:04 -08:00
|
|
|
} // genPosixLockObjOnlyAttrs)
|