7 stdenv.mkDerivation (finalAttrs: {
12 url = "http://www.and.org/ustr/ustr.git";
13 rev = "v${finalAttrs.version}";
14 hash = "sha256-pQrQy+S9fVFl8Mop4QmwEAXGiBSheQE4HgAZ4srFz64=";
17 # Fixes bogus warnings that failed libsemanage
18 patches = [ ./va_args.patch ];
20 # Work around gcc5 switch to gnu11
21 env.NIX_CFLAGS_COMPILE = "-std=gnu89";
23 # Fix detection of stdint.h
25 substituteInPlace Makefile \
26 --replace-fail "have_stdint_h=0" "have_stdint_h=1"
28 cat ustr-import.in | grep USTR_CONF
29 substituteInPlace ustr-import.in \
30 --replace-fail "USTR_CONF_HAVE_STDINT_H 0" "USTR_CONF_HAVE_STDINT_H 1"
34 "prefix=${placeholder "out"}"
39 # Remove debug libraries
41 find $out/lib -name \*debug\* -delete
45 homepage = "http://www.and.org/ustr/";
46 description = "Micro String API for C language";
47 mainProgram = "ustr-import";
48 license = lib.licenses.bsd2;
49 maintainers = with lib.maintainers; [ sigmanificient ];
50 platforms = lib.platforms.linux;