2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "libowfat";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "0.33";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://www.fefe.de/libowfat/${pname}-${version}.tar.xz";
|
2023-03-30 22:05:00 +00:00
|
|
|
sha256 = "sha256-MR7Is/S3K7RC4yP7ATqY+Vb6dFVH8ryUVih7INAnzX0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# Fix for glibc 2.34 from Gentoo
|
|
|
|
# https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=914a4aa87415dabfe77181a2365766417a5919a4
|
|
|
|
postPatch = ''
|
|
|
|
# do not define "__pure__", this the gcc builtin (bug #806505)
|
|
|
|
sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
|
|
|
|
sed 's#__pure__$#__attrib__pure__#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
|
|
|
|
# remove unneeded definition of __deprecated__
|
|
|
|
sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die
|
|
|
|
'';
|
2023-03-30 22:05:00 +00:00
|
|
|
preBuild = ''
|
|
|
|
make headers
|
|
|
|
'';
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GPL reimplementation of libdjb";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.fefe.de/libowfat/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|