From 9b5adef52da392d2f40bd5404c1aa1d2431c07da Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 18 Mar 2024 14:26:45 -0700 Subject: [PATCH] put prerelease info in the version --- flake.nix | 8 ++++++-- overlay.nix | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 16cac15..aab8aaf 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,13 @@ inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-compat.url = "git+ssh://git@git.lix.systems/lix-project/flake-compat"; - outputs = { self, nixpkgs, lix, flake-utils, ... }: { + outputs = inputs@{ self, nixpkgs, lix, flake-utils, ... }: { + inherit inputs; nixosModules.default = import ./module.nix { inherit lix; }; - overlays.default = import ./overlay.nix { inherit lix; }; + overlays.default = import ./overlay.nix { + inherit lix; + versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev}"; + }; } // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { diff --git a/overlay.nix b/overlay.nix index 2d9f620..d526d5b 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,4 +1,4 @@ -{ lix }: +{ lix, versionSuffix ? "" }: final: prev: let boehmgc-patched = ((final.boehmgc.override { @@ -21,8 +21,8 @@ in 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"; - VERSION_SUFFIX = "-lix"; + version = "2.18.3-lix${versionSuffix}"; + VERSION_SUFFIX = "-lix${versionSuffix}"; patches = [ ]; # FIXME: we don't know why this was not being picked up properly when