Merge pull request 'callPackage Lix instead of overriding Nixpkgs' Nix' (#17) from qyriad/nixos-module:call-package into main

Reviewed-on: lix-project/nixos-module#17
This commit is contained in:
Qyriad 2024-04-22 03:57:44 +00:00
commit 71f268f215

View file

@ -15,8 +15,15 @@ let
}) })
); );
# Internal nix-doc used by Lix. lixPkg = (final.callPackage (lix + "/package.nix") {
lix-doc = final.callPackage (lix + "/lix-doc/package.nix") { }; build-release-notes = false;
versionSuffix = "-lix${versionSuffix}";
boehmgc-nix = boehmgc-patched;
}).overrideAttrs {
# Note: load-bearing version override. Nixpkgs does version detection to determine
# what commands and whatnot we support, so tell Nixpkgs that we're 2.18 (ish).
version = "2.18.3-lix${versionSuffix}";
};
in in
{ {
# used for things that one wouldn't necessarily want to update, but we # used for things that one wouldn't necessarily want to update, but we
@ -26,28 +33,7 @@ in
nixVersions = prev.nixVersions // rec { nixVersions = prev.nixVersions // rec {
# FIXME: do something less scuffed # FIXME: do something less scuffed
nix_2_18 = (prev.nixVersions.nix_2_18.override { boehmgc = boehmgc-patched; }).overrideAttrs (old: { nix_2_18 = lixPkg;
src = lix;
# FIXME: fake version so that nixpkgs will not try to use nix config >_>
version = "2.18.3-lix${versionSuffix}";
VERSION_SUFFIX = "-lix${versionSuffix}";
# We only include CMake so that Meson can locate toml11, which only ships CMake dependency metadata.
dontUseCmakeConfigure = true;
patches = [ ];
buildInputs = old.buildInputs or [ ] ++ [
final.toml11
lix-doc
];
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
final.buildPackages.cmake
# FIXME: we don't know why this was not being picked up properly when
# included in nativeCheckInputs.
final.buildPackages.git
final.buildPackages.python3
];
});
stable = nix_2_18; stable = nix_2_18;
nix_2_18_upstream = prev.nixVersions.nix_2_18; nix_2_18_upstream = prev.nixVersions.nix_2_18;
}; };