83 lines
2 KiB
Nix
83 lines
2 KiB
Nix
{ nixpkgs, ... }: final: prev:
|
|
let
|
|
inherit (final)
|
|
lib
|
|
hostPlatform
|
|
callPackage
|
|
addAttrsToDerivation;
|
|
|
|
inherit (lib)
|
|
toList;
|
|
|
|
pkgs = import nixpkgs {
|
|
localSystem = final.buildPlatform;
|
|
crossSystem = final.hostPlatform;
|
|
config = removeAttrs final.config [
|
|
"replaceStdenv"
|
|
"replaceCrossStdenv"
|
|
];
|
|
};
|
|
|
|
idiosyn = import ./stdenv.nix pkgs;
|
|
|
|
gentoo-patches = final.fetchgit {
|
|
url = "https://anongit.gentoo.org/git/repo/gentoo.git";
|
|
rev = "fa77d52a7ff39464c50707ca024725deab08b534";
|
|
sparseCheckout = [ "*.patch" ];
|
|
nonConeMode = true;
|
|
hash = "sha256-ZTrPeo8TjKSDAUyeJyWq1C8O9EXd9uhClHlphPsFXCA=";
|
|
};
|
|
in {
|
|
inherit idiosyn;
|
|
|
|
buildPackages = prev.buildPackages // {
|
|
stdenv = final.stdenv;
|
|
};
|
|
|
|
busybox = prev.busybox.override {
|
|
stdenv = final.gccStdenv;
|
|
};
|
|
|
|
efivar = prev.efivar.overrideAttrs (base: {
|
|
buildFlags = base.buildFlags or [ ]
|
|
++ [ "CC=$(CC)" ];
|
|
});
|
|
|
|
icu = prev.icu.overrideAttrs (base: {
|
|
configureFlags = base.configureFlags or [ ]
|
|
++ [ "ac_cv_c_bigendian=${if hostPlatform.isBigEndian then "yes" else "no"}" ];
|
|
});
|
|
|
|
keyutils = prev.keyutils.overrideAttrs (base: {
|
|
LDFLAGS = base.LDFLAGS or [ ]
|
|
++ [ "-Wl,--undefined-version" ];
|
|
});
|
|
|
|
kexec-tools = prev.kexec-tools.override {
|
|
stdenv = final.gccStdenv;
|
|
};
|
|
|
|
libgcrypt = prev.libgcrypt.overrideAttrs (base: {
|
|
configureFlags = base.configureFlags or [ ]
|
|
++ [ "--disable-jent-support" ];
|
|
});
|
|
|
|
libxcrypt = prev.libxcrypt.overrideAttrs (base: {
|
|
NIX_LDFLAGS = base.NIX_LDFLAGS or [ ]
|
|
++ [ "--undefined-version" ];
|
|
});
|
|
|
|
mbrola = prev.mbrola.override {
|
|
stdenv = addAttrsToDerivation (base: {
|
|
env = base.env or { } // {
|
|
NIX_CFLAGS_COMPILE = toString (toList base.env.NIX_CFLAGS_COMPILE or [ ]
|
|
++ [ "-Wno-error=implicit-function-declaration" ]);
|
|
};
|
|
}) final.stdenv;
|
|
};
|
|
|
|
musl = prev.musl.overrideAttrs (base: {
|
|
LDFLAGS = base.LDFLAGS or [ ]
|
|
++ [ "-Wl,-u,__dls2" ];
|
|
});
|
|
}
|