diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix b/infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix index 46c29e2fa125..9f945b15dec2 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/libraries/audiofile/default.nix @@ -28,6 +28,21 @@ stdenv.mkDerivation rec { # fix build with gcc9 NIX_CFLAGS_LINK = lib.optional (stdenv.system == "i686-linux") "-lgcc"; + # Even when statically linking, libstdc++.la is put in dependency_libs here, + # and hence libstdc++.so passed to the linker, just pass -lstdc++ and let the + # compiler do what it does best. (libaudiofile.la is a generated file, so we + # have to run `make` that far first). + # + # Without this, the executables in this package (sfcommands and examples) + # fail to build: https://github.com/NixOS/nixpkgs/issues/103215 + # + # There might be a more sensible way to do this with autotools, but I am not + # smart enough to discover it. + preBuild = lib.optionalString stdenv.targetPlatform.isStatic '' + make -C libaudiofile $makeFlags + sed -i "s/dependency_libs=.*/dependency_libs=' -lstdc++'/" libaudiofile/libaudiofile.la + ''; + patches = [ ./gcc-6.patch ./CVE-2015-7747.patch |