From 8c2d5ca8bc425e886e9304dc0a9d88edb6e4dc8a Mon Sep 17 00:00:00 2001 From: Qyriad Date: Thu, 18 Apr 2024 14:56:07 -0600 Subject: [PATCH] callPackage Lix instead of overriding Nixpkgs' Nix --- overlay.nix | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/overlay.nix b/overlay.nix index 7a05dd8..4f5a6c8 100644 --- a/overlay.nix +++ b/overlay.nix @@ -15,8 +15,15 @@ let }) ); - # Internal nix-doc used by Lix. - lix-doc = final.callPackage (lix + "/lix-doc/package.nix") { }; + lixPkg = (final.callPackage (lix + "/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 { # used for things that one wouldn't necessarily want to update, but we @@ -26,28 +33,7 @@ in nixVersions = prev.nixVersions // rec { # FIXME: do something less scuffed - nix_2_18 = (prev.nixVersions.nix_2_18.override { boehmgc = boehmgc-patched; }).overrideAttrs (old: { - 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 - ]; - }); + nix_2_18 = lixPkg; stable = nix_2_18; nix_2_18_upstream = prev.nixVersions.nix_2_18; };