Merge pull request #92416 from matthewbauer/fix-elfutils

Fix elfutils
This commit is contained in:
Matthew Bauer 2020-07-06 12:27:27 -04:00 committed by GitHub
commit 89d4142fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -50,7 +50,7 @@ stdenv.mkDerivation {
meta = with stdenv.lib; {
homepage = "https://www.lysator.liu.se/~nisse/misc/";
description = "Standalone version of arguments parsing functions from GLIBC";
platforms = with platforms; darwin ++ [ "x86_64-linux" ];
platforms = with platforms; darwin ++ linux;
maintainers = with maintainers; [ amar1729 ];
license = licenses.gpl2;
};

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs }:
{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs, argp-standalone }:
# TODO: Look at the hardcoded paths to kernel, modules etc.
stdenv.mkDerivation rec {
@ -17,10 +17,15 @@ stdenv.mkDerivation rec {
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
# as the host-bzip2 will be in the path.
nativeBuildInputs = [ m4 bison flex gettext bzip2 ];
buildInputs = [ zlib bzip2 xz ];
buildInputs = [ zlib bzip2 xz ]
++ lib.optional stdenv.hostPlatform.isMusl argp-standalone;
propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
NIX_CFLAGS_COMPILE+=" -fgnu89-inline"
'';
configureFlags =
[ "--program-prefix=eu-" # prevent collisions with binutils
"--enable-deterministic-archives"