nixos-configs/overlays/nix-version/default.nix

51 lines
1.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

self: {nix ? null}: final: prev: let
inherit (builtins) mapAttrs replaceStrings;
inherit (final.lib) generateSplicesForMkScope versions;
inherit (self.inputs) nix-eval-jobs nix-fast-build;
nullCheck = n: v:
if nix == null
then prev.${n}
else v;
overrideAll = self.lib.overrideAll final;
in
mapAttrs nullCheck {
inherit nix;
nix-serve = prev.nix-serve-ng.override {
inherit nix;
};
nix-output-monitor = prev.nix-output-monitor.overrideAttrs (o: {
postPatch = ''
${o.postPatch}
sed -i 's/.*" nom hasnt detected any input. Have you redirected nix-build stderr into nom? (See -h and the README for details.)".*//' ./lib/NOM/Print.hs
'';
});
nix-eval-jobs =
(overrideAll nix-eval-jobs.packages.${final.system}.default {
srcDir = null;
nixComponents = let
generateSplicesForNixComponents = nixComponentsAttributeName:
generateSplicesForMkScope [
"nixVersions"
nixComponentsAttributeName
];
in
final.nixDependencies.callPackage "${final.path}/pkgs/tools/package-management/nix/modular/packages.nix" {
inherit (nix) src version;
inherit (nix.meta) maintainers;
otherSplices = generateSplicesForNixComponents "nixComponents_${
replaceStrings ["."] ["_"] (versions.majorMinor nix.version)
}";
};
})
// {inherit nix;};
nix-fast-build = overrideAll nix-fast-build.packages.${final.system}.nix-fast-build {};
}