2015-07-31 19:38:36 +00:00
|
|
|
{ stdenv, fetchurl }:
|
2011-03-27 04:46:05 +00:00
|
|
|
|
2015-07-31 19:38:36 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "ustr";
|
2011-03-27 04:46:05 +00:00
|
|
|
version = "1.0.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "http://www.and.org/ustr/${version}/${pname}-${version}.tar.bz2";
|
2011-03-27 04:46:05 +00:00
|
|
|
sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
|
|
|
|
};
|
2013-02-24 12:25:53 +00:00
|
|
|
|
2015-07-31 19:38:36 +00:00
|
|
|
# Fixes bogus warnings that failed libsemanage
|
|
|
|
patches = [ ./va_args.patch ];
|
|
|
|
|
|
|
|
# Work around gcc5 switch to gnu11
|
|
|
|
NIX_CFLAGS_COMPILE = "-std=gnu89";
|
|
|
|
|
|
|
|
# Fix detection of stdint.h
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,\(have_stdint_h\)=0,\1=1,g' Makefile
|
|
|
|
sed -i 's,\(USTR_CONF_HAVE_STDINT_H\) 0,\1 1,g' ustr-import.in
|
|
|
|
'';
|
2011-03-27 04:46:05 +00:00
|
|
|
|
2015-07-31 19:38:36 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=("prefix=$out")
|
|
|
|
makeFlagsArray+=("LDCONFIG=echo")
|
|
|
|
makeFlagsArray+=("HIDE=")
|
|
|
|
'';
|
2011-03-27 04:46:05 +00:00
|
|
|
|
2015-07-31 19:38:36 +00:00
|
|
|
# Remove debug libraries
|
|
|
|
postInstall = ''
|
|
|
|
find $out/lib -name \*debug\* -delete
|
|
|
|
'';
|
2011-03-27 04:46:05 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.and.org/ustr/";
|
2011-03-27 04:46:05 +00:00
|
|
|
description = "Micro String API for C language";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.linux;
|
2011-03-27 04:46:05 +00:00
|
|
|
};
|
2013-02-24 12:25:53 +00:00
|
|
|
}
|