1 { stdenv, lib, buildPackages, fetchurl, gettext
2 , genPosixLockObjOnly ? false
4 genPosixLockObjOnlyAttrs = lib.optionalAttrs genPosixLockObjOnly {
7 make gen-posix-lock-obj
12 install -m755 gen-posix-lock-obj $out/bin
18 in stdenv.mkDerivation (rec {
19 pname = "libgpg-error";
23 url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
24 sha256 = "sha256-Vw+O5PtL/3t0lc/5IMJ1ACrqIUfpodIgwGghMmf4CiY=";
28 sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
31 outputs = [ "out" "dev" "info" ];
32 outputBin = "dev"; # deps want just the lib, most likely
34 # If architecture-dependent MO files aren't available, they're generated
35 # during build, so we need gettext for cross-builds.
36 depsBuildBuild = [ buildPackages.stdenv.cc ];
37 nativeBuildInputs = [ gettext ];
40 lib.optionalString stdenv.isSunOS
41 # For some reason, /bin/sh on OpenIndiana leads to this at the end of the
42 # `config.status' run:
43 # ./config.status[1401]: shift: (null): bad number
44 # (See <https://hydra.nixos.org/build/2931046/nixlog/1/raw>.)
45 # Thus, re-run it with Bash.
46 "${stdenv.shell} config.status";
48 doCheck = true; # not cross
51 homepage = "https://www.gnupg.org/software/libgpg-error/index.html";
52 changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=NEWS;hb=refs/tags/libgpg-error-${version}";
53 description = "A small library that defines common error values for all GnuPG components";
56 Libgpg-error is a small library that defines common error values
57 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
58 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
59 Daemon and possibly more in the future.
62 license = licenses.lgpl2Plus;
63 platforms = platforms.all;
64 maintainers = [ maintainers.vrthra ];
66 } // genPosixLockObjOnlyAttrs)