idiosyn/overlay.nix
2024-07-26 16:33:35 +02:00

59 lines
1.5 KiB
Nix

{ nixpkgs, ... }: final: prev:
let
inherit (final) lib callPackage;
inherit (lib) concatStringsSep remove splitString subtractLists toList;
pkgs = import nixpkgs {
localSystem = final.buildPlatform;
crossSystem = final.hostPlatform;
config = removeAttrs final.config [
"replaceStdenv"
"replaceCrossStdenv"
];
};
idiosyn = import ./stdenv.nix pkgs;
removeFlag = flag: flags:
concatStringsSep " " (remove flag (splitString " " flags));
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;
};
keyutils = prev.keyutils.overrideAttrs (base: {
LDFLAGS = base.LDFLAGS or [ ]
++ [ "-Wl,--undefined-version" ];
});
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" ];
});
musl = prev.musl.overrideAttrs (base: {
LDFLAGS = base.LDFLAGS or [ ]
++ [ "-Wl,-u,__dls2" ];
});
time = prev.time.overrideAttrs (base: {
patches = base.patches or [ ]
++ [ "${gentoo-patches}/sys-process/time/files/time-1.9-implicit-func-decl-clang.patch" ];
});
}