ustr: Cleanup
This commit is contained in:
parent
40f45dcb6d
commit
308da3054e
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, glibc }:
|
{ stdenv, fetchurl }:
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
name = "ustr-${version}";
|
name = "ustr-${version}";
|
||||||
version = "1.0.4";
|
version = "1.0.4";
|
||||||
|
|
||||||
@ -9,14 +9,30 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
|
sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = "substituteInPlace Makefile --replace /usr/include/ ${glibc}/include/";
|
# Fixes bogus warnings that failed libsemanage
|
||||||
|
patches = [ ./va_args.patch ];
|
||||||
|
|
||||||
patches = [ ./va_args.patch ]; # fixes bogus warnings that failed libsemanage
|
# Work around gcc5 switch to gnu11
|
||||||
|
NIX_CFLAGS_COMPILE = "-std=gnu89";
|
||||||
|
|
||||||
makeFlags = "DESTDIR=$(out) prefix= LDCONFIG=echo";
|
# 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
|
||||||
|
'';
|
||||||
|
|
||||||
configurePhase = "make ustr-import";
|
buildTargets = [ "all-shared" ];
|
||||||
buildInputs = [ glibc ];
|
|
||||||
|
preBuild = ''
|
||||||
|
makeFlagsArray+=("prefix=$out")
|
||||||
|
makeFlagsArray+=("LDCONFIG=echo")
|
||||||
|
makeFlagsArray+=("HIDE=")
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Remove debug libraries
|
||||||
|
postInstall = ''
|
||||||
|
find $out/lib -name \*debug\* -delete
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.and.org/ustr/;
|
homepage = http://www.and.org/ustr/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user