fix: use the official-release bit from the Lix sources to skip versionSuffix
I wrote that json file intending to use it for this and then forgot. lol oops.
This commit is contained in:
parent
e350380d72
commit
1c291723b9
|
@ -8,8 +8,12 @@
|
|||
inputs.flakey-profile.url = "github:lf-/flakey-profile";
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, lix, flake-utils, flakey-profile, ... }:
|
||||
let versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
|
||||
in {
|
||||
let
|
||||
lixVersionJson = builtins.fromJSON (builtins.readFile (lix + "/version.json"));
|
||||
versionSuffix = nixpkgs.lib.optionalString (!lixVersionJson.official_release)
|
||||
"-pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
|
||||
in
|
||||
{
|
||||
inherit inputs;
|
||||
nixosModules = {
|
||||
# Use a locally built Lix
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
# usage.
|
||||
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
|
||||
lixPackageFromSource = final.callPackage (lix + "/package.nix") ({
|
||||
versionSuffix = "-${versionSuffix}";
|
||||
inherit versionSuffix;
|
||||
});
|
||||
|
||||
# These packages depend on Nix features that Lix does not support
|
||||
|
@ -23,7 +23,8 @@ let
|
|||
override_2_18 = prev.lib.genAttrs overridelist_2_18 (
|
||||
name: prev.${name}.override {
|
||||
nix = final.nixVersions.nix_2_18_upstream;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
inherit (prev) lib;
|
||||
|
||||
|
@ -56,7 +57,7 @@ let
|
|||
maybeWarnDuplicate = x: if final.lix-overlay-present > 1 then builtins.trace warning x else x;
|
||||
|
||||
versionJson = builtins.fromJSON (builtins.readFile ./version.json);
|
||||
supportedLixMajor = builtins.elemAt (builtins.match ''^([[:digit:]]+\.[[:digit:]]+)\..*'' versionJson.version) 0;
|
||||
supportedLixMajor = lib.versions.majorMinor versionJson.version;
|
||||
lixPackageToUse = if lix != null then lixPackageFromSource else prev.lix;
|
||||
# Especially if using Lix from nixpkgs, it is plausible that the overlay
|
||||
# could be used against the wrong Lix major version and cause confusing build
|
||||
|
|
Loading…
Reference in a new issue