nixUnstable: fix build on gcc10

This commit is contained in:
Lucas Ransan 2020-12-24 14:01:24 +01:00 committed by Frederik Rietdijk
parent a909a45e04
commit 2cb2a5348e

View file

@ -1,4 +1,4 @@
{ lib, fetchurl, fetchFromGitHub, callPackage { lib, fetchurl, fetchpatch, fetchFromGitHub, callPackage
, storeDir ? "/nix/store" , storeDir ? "/nix/store"
, stateDir ? "/nix/var" , stateDir ? "/nix/var"
, confDir ? "/etc" , confDir ? "/etc"
@ -23,13 +23,13 @@ common =
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp , withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp , withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
, enableStatic ? false , enableStatic ? false
, name, suffix ? "", src , name, suffix ? "", src, patches ? []
}: }:
let let
sh = busybox-sandbox-shell; sh = busybox-sandbox-shell;
nix = stdenv.mkDerivation rec { nix = stdenv.mkDerivation rec {
inherit name src; inherit name src patches;
version = lib.getVersion name; version = lib.getVersion name;
is24 = lib.versionAtLeast version "2.4pre"; is24 = lib.versionAtLeast version "2.4pre";
@ -208,6 +208,13 @@ in rec {
sha256 = "0qhd3nxvqzszzsfvh89xhd239ycqb0kq2n0bzh9br78pcb60vj3g"; sha256 = "0qhd3nxvqzszzsfvh89xhd239ycqb0kq2n0bzh9br78pcb60vj3g";
}; };
patches = [
(fetchpatch { # Fix build on gcc10
url = "https://github.com/NixOS/nix/commit/d4870462f8f539adeaa6dca476aff6f1f31e1981.patch";
sha256 = "mTvLvuxb2QVybRDgntKMq+b6da/s3YgM/ll2rWBeY/Y=";
})
];
inherit storeDir stateDir confDir boehmgc; inherit storeDir stateDir confDir boehmgc;
}); });