2022-10-26 22:38:14 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, perl
|
|
|
|
, texinfo
|
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, gnutls
|
|
|
|
, samba
|
|
|
|
, qemu
|
|
|
|
}:
|
2010-01-20 11:09:04 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-11-09 21:14:04 +00:00
|
|
|
pname = "libtasn1";
|
2022-08-24 14:41:35 +00:00
|
|
|
version = "4.19.0";
|
2008-05-20 14:25:09 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-09 21:14:04 +00:00
|
|
|
url = "mirror://gnu/libtasn1/libtasn1-${version}.tar.gz";
|
2022-08-24 14:41:35 +00:00
|
|
|
sha256 = "sha256-FhPwrBz0hNbsDOO4wG1WJjzHJC8cI7MNgtI940WmP3o=";
|
2008-05-20 14:25:09 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 07:50:49 +00:00
|
|
|
# Patch borrowed from alpine to work around a specific test failure with musl libc
|
|
|
|
# Upstream is patching this test in their own CI because that CI is using alpine and thus musl
|
|
|
|
# https://github.com/gnutls/libtasn1/commit/06e7433c4e587e2ba6df521264138585a63d07c7#diff-037ea159eb0a7cb0ac23b851e66bee30fb838ee8d0d99fa331a1ba65283d37f7R293
|
|
|
|
patches = lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
|
|
|
|
url = "https://git.alpinelinux.org/aports/plain/main/libtasn1/failed-test.patch?id=aaed9995acc1511d54d5d93e1ea3776caf4aa488";
|
|
|
|
sha256 = "sha256-GTfwqEelEsGtLEcBwGRfBZZz1vKXRfWXtMx/409YqX8=";
|
|
|
|
});
|
|
|
|
|
2016-09-01 09:07:23 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2015-10-07 20:24:10 +00:00
|
|
|
outputBin = "dev";
|
|
|
|
|
2018-07-20 17:58:06 +00:00
|
|
|
nativeBuildInputs = [ texinfo perl ];
|
2014-03-29 17:36:38 +00:00
|
|
|
|
2010-04-13 08:56:04 +00:00
|
|
|
doCheck = true;
|
2020-02-10 23:06:54 +00:00
|
|
|
preCheck = if stdenv.isDarwin then
|
|
|
|
"export DYLD_LIBRARY_PATH=`pwd`/lib/.libs"
|
|
|
|
else
|
|
|
|
null;
|
2010-04-13 08:56:04 +00:00
|
|
|
|
2022-10-26 22:38:14 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit gnutls samba qemu;
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/libtasn1/";
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "An ASN.1 library";
|
2017-01-11 22:47:54 +00:00
|
|
|
longDescription = ''
|
|
|
|
Libtasn1 is the ASN.1 library used by GnuTLS, GNU Shishi and some
|
|
|
|
other packages. The goal of this implementation is to be highly
|
|
|
|
portable, and only require an ANSI C89 platform.
|
|
|
|
'';
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.all;
|
2008-05-20 14:25:09 +00:00
|
|
|
};
|
|
|
|
}
|