1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
8 url = "http://www.and.org/ustr/${version}/${pname}-${version}.tar.bz2";
9 sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
12 # Fixes bogus warnings that failed libsemanage
13 patches = [ ./va_args.patch ];
15 # Work around gcc5 switch to gnu11
16 env.NIX_CFLAGS_COMPILE = "-std=gnu89";
18 # Fix detection of stdint.h
20 sed -i 's,\(have_stdint_h\)=0,\1=1,g' Makefile
21 sed -i 's,\(USTR_CONF_HAVE_STDINT_H\) 0,\1 1,g' ustr-import.in
25 makeFlagsArray+=("prefix=$out")
26 makeFlagsArray+=("LDCONFIG=echo")
27 makeFlagsArray+=("HIDE=")
30 # Remove debug libraries
32 find $out/lib -name \*debug\* -delete
36 homepage = "http://www.and.org/ustr/";
37 description = "Micro String API for C language";
38 license = licenses.bsd2;
40 platforms = platforms.linux;