nixos-module/overlay.nix

75 lines
2.4 KiB
Nix
Raw Normal View History

2024-03-18 21:26:45 +00:00
{ lix, versionSuffix ? "" }:
2024-03-07 19:27:15 +00:00
final: prev:
let
boehmgc-patched = ((final.boehmgc.override {
enableLargeConfig = true;
}).overrideAttrs (o: {
patches = (o.patches or [ ]) ++ [
# for clown reasons this version is newer than the one in lix, we should
# fix this and update our nixpkgs pin
(prev.path + "/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch")
# https://github.com/ivmai/bdwgc/pull/586
(builtins.path { path = lix + "/boehmgc-traceable_allocator-public.diff"; name = "boehmgc-traceable_allocator-public.patch"; })
2024-03-07 19:27:15 +00:00
];
})
);
# Internal nix-doc used by Lix.
lix-doc = final.callPackage (lix + "/nix-doc/package.nix") { };
2024-03-07 19:27:15 +00:00
in
{
2024-03-07 19:38:40 +00:00
nixVersions = prev.nixVersions // rec {
2024-03-07 19:27:15 +00:00
# FIXME: do something less scuffed
nix_2_18 = (prev.nixVersions.nix_2_18.override { boehmgc = boehmgc-patched; }).overrideAttrs (old: {
src = lix;
2024-03-08 08:10:56 +00:00
# FIXME: fake version so that nixpkgs will not try to use nix config >_>
2024-03-18 21:26:45 +00:00
version = "2.18.3-lix${versionSuffix}";
VERSION_SUFFIX = "-lix${versionSuffix}";
2024-03-07 19:27:15 +00:00
# We only include CMake so that Meson can locate toml11, which only ships CMake dependency metadata.
dontUseCmakeConfigure = true;
2024-03-07 19:27:15 +00:00
patches = [ ];
2024-04-02 07:41:06 +00:00
buildInputs = old.buildInputs or [ ] ++ [
final.toml11
lix-doc
2024-04-02 07:41:06 +00:00
];
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
final.buildPackages.cmake
# FIXME: we don't know why this was not being picked up properly when
# included in nativeCheckInputs.
2024-04-02 07:41:06 +00:00
final.buildPackages.git
final.buildPackages.python3
];
2024-03-07 19:27:15 +00:00
});
2024-03-07 19:38:40 +00:00
stable = nix_2_18;
2024-03-07 20:11:49 +00:00
nix_2_18_upstream = prev.nixVersions.nix_2_18;
};
# force these onto upstream so we are not regularly rebuilding electron
prefetch-yarn-deps = prev.prefetch-yarn-deps.override {
nix = final.nixVersions.nix_2_18_upstream;
};
prefetch-npm-deps = prev.prefetch-npm-deps.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nix-prefetch-git = prev.nix-prefetch-git.override {
nix = final.nixVersions.nix_2_18_upstream;
2024-03-07 19:27:15 +00:00
};
2024-03-07 19:45:59 +00:00
nixos-option = prev.nixos-option.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nix-doc = prev.callPackage ./nix-doc/package.nix { withPlugin = false; };
2024-03-27 04:54:26 +00:00
nix-init = prev.nix-init.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nurl = prev.nurl.override {
nix = final.nixVersions.nix_2_18_upstream;
};
2024-03-07 19:27:15 +00:00
}