Compare commits

...

13 commits

Author SHA1 Message Date
jade 691193879d update nix-eval-jobs to fix its build
Also updates the validation versions of nixpkgs and lix.
2024-11-09 12:55:31 -08:00
jade fd186f535a Merge pull request 'overlay: fix bug where prev should have been final' (#38) from fabianhjr/nixos-module:fix-bug-between-prev-final into main
Reviewed-on: #38
2024-10-01 03:21:01 +00:00
Fabián Heredia Montiel 81d9ff97c9 overlay: fix bug where prev should have been final 2024-09-30 18:51:33 -06:00
jade 7dd3d652a3 Fix up the flake checks 2024-09-30 13:49:18 -07:00
jade ca0cc16273 Merge pull request #37 into main
Closes #37
2024-09-30 13:35:21 -07:00
jade bb51b2d161 jade revision pass 2024-09-30 13:34:26 -07:00
Fabián Heredia Montiel b3457b78ac overlay: make finalNix depend on the nix version being used by a package
This should address both of the following (were 35 is more general and
36 a specific case)

- #35
- #36
2024-09-26 17:54:28 -06:00
jade b0e6f35950 overlay: clean up 2.18 stuff
Since Nix 2.24 is now the default in nixpkgs, we should remove the stuff
that assumes it's 2.18. Nothing breaks with this change, unless someone
is specifically depending on nixVersions.nix_2_18 being Lix.
2024-09-17 20:47:29 -07:00
jade daeb420858 Merge pull request 'fix: check package arguments before applying Nix 2.18 override' (#34) from devusb/nixos-module:remove-devenv-overlay into main
Reviewed-on: #34
2024-09-18 03:39:56 +00:00
Morgan Helton 0dda988746
fix: check package arguments before applying nix 2.18 override 2024-09-15 14:40:36 -05:00
eldritch horrors 353b25f0b6 always use clang to build lix 2024-09-09 01:05:28 +02:00
jade cecf70b775 Merge branch 'release-2.91' to mainline
This is a fake commit to trick Git into thinking the 2.91.0 tag is in
mainline.
2024-08-12 18:11:23 -07:00
jade 542fb09131 Update version to 2.92 2024-08-12 18:11:20 -07:00
5 changed files with 56 additions and 33 deletions

View file

@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
@ -36,24 +36,24 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1723503926,
"narHash": "sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s=",
"rev": "bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2",
"lastModified": 1731164513,
"narHash": "sha256-WnT6MpgrMKgqV2Rs+MfU88+KO+/njELPOtGoNhoX2oA=",
"rev": "b967f1d5fe9d1bf58e6159e9b426c5b341489397",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2.tar.gz?rev=bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2"
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/b967f1d5fe9d1bf58e6159e9b426c5b341489397.tar.gz?rev=b967f1d5fe9d1bf58e6159e9b426c5b341489397"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz"
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"lastModified": 1730785428,
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github"
},
"original": {

View file

@ -1,7 +1,7 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.lix = {
url = "https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz";
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
inputs.flake-utils.url = "github:numtide/flake-utils";
@ -47,7 +47,7 @@
{
inherit pkgs;
packages = {
default = pkgs.nixVersions.nix_2_18;
default = pkgs.nix;
inherit (pkgs) nix-doc nix-eval-jobs;
};
@ -57,6 +57,7 @@
checks = {
inherit (self.packages.${system}) default nix-eval-jobs;
inherit (pkgs) nixos-option;
} // lib.optionalAttrs (lib.elem system linux64BitSystems) {
# wrongMajor intentionally not included here since it is expected to fail
inherit (self.nixosTests.${system}) it-builds;

View file

@ -1,16 +1,14 @@
{ lix, versionSuffix ? "" }:
final: prev:
let
# This is kind of scary to not override the nix version to pretend to be
# 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI
# usage.
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
lixPackageFromSource = final.callPackage (lix + "/package.nix") ({
inherit versionSuffix;
stdenv = final.clangStdenv;
});
# These packages depend on Nix features that Lix does not support
overridelist_2_18 = [
# These packages should receive CppNix since they may link to it or otherwise
# cause problems (or even just silly mass-rebuilds) if we give them Lix
overridelist_upstream = [
"attic-client"
"devenv"
"nix-du"
@ -20,11 +18,6 @@ let
"nurl"
"prefetch-yarn-deps" # force these onto upstream so we are not regularly rebuilding electron
];
override_2_18 = prev.lib.genAttrs overridelist_2_18 (
name: prev.${name}.override {
nix = final.nixVersions.nix_2_18_upstream;
}
);
inherit (prev) lib;
@ -64,7 +57,37 @@ let
# errors. This is a simple safeguard to put in at least something that might be seen.
maybeWarnWrongMajor = x: if !(lib.hasPrefix supportedLixMajor lixPackageToUse.version) then builtins.trace wrongMajorWarning x else x;
overlay = override_2_18 // {
# It is not enough to *just* throw whatever the default nix version is at
# anything in the "don't give lix" list, we have to *also* ensure that we
# give whatever upstream version as specified in the callPackage invocation.
#
# Unfortunately I don't think there is any actual way to directly query that,
# so we instead do something extremely evil and guess which version it
# probably was. This code is not generalizable to arbitrary derivations, so
# it will hopefully not make us cry, at least.
useCppNixOverlay =
lib.genAttrs overridelist_upstream (
name:
if (lib.functionArgs prev.${name}.override ? "nix") then
let
# Get the two common inputs of a derivation/package.
inputs = prev.${name}.buildInputs ++ prev.${name}.nativeBuildInputs;
nixDependency = lib.findFirst
(drv: (drv.pname or "") == "nix")
final.nixVersions.stable_upstream # default to stable nix if nix is not an input
inputs;
nixMajor = lib.versions.major (nixDependency.version or "");
nixMinor = lib.versions.minor (nixDependency.version or "");
nixAttr = "nix_${nixMajor}_${nixMinor}";
finalNix = final.nixVersions.${nixAttr};
in
prev.${name}.override {
nix = finalNix;
}
else prev.${name}
);
overlay = useCppNixOverlay // {
lix-overlay-present = 1;
# used for things that one wouldn't necessarily want to update, but we
# nevertheless shove it in the overlay and fixed-point it in case one *does*
@ -73,19 +96,18 @@ let
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);
nixVersions = prev.nixVersions // rec {
nix_2_18 = final.lix;
stable = nix_2_18;
nix_2_18_upstream = prev.nixVersions.nix_2_18;
nixVersions = prev.nixVersions // {
stable = final.lix;
stable_upstream = prev.nixVersions.stable;
};
nix-eval-jobs = (prev.nix-eval-jobs.override {
# lix
nix = final.nixVersions.nix_2_18;
nix = final.lix;
}).overrideAttrs (old:
let src = final.lix-sources.nix-eval-jobs;
in {
version = "2.91.0-lix-${builtins.substring 0 7 src.rev}";
version = "2.92.0-lix-${builtins.substring 0 7 src.rev}";
# FIXME: should this be patches instead?
inherit src;

View file

@ -1 +1 @@
{"nix-eval-jobs": {"kind": "tarball", "rev": "f8869bdcca7c1d5aaf37de3da3a4176811279a57", "nar_hash": "sha256-F/RvI9chHywnckEqHO1ggjzCayknhDnnl2kNnnVXpWg=", "locked_url": "https://git.lix.systems/api/v1/repos/lix-project/nix-eval-jobs/archive/f8869bdcca7c1d5aaf37de3da3a4176811279a57.tar.gz?rev=f8869bdcca7c1d5aaf37de3da3a4176811279a57", "url": "https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz"}}
{"nix-eval-jobs": {"kind": "tarball", "rev": "57ddb99e781d19704f8a84036f9890e6ca554c41", "nar_hash": "sha256-9qkRZFTgbMonlBaLqL+OW6iiHLWXuBJlThISMhwQuGg=", "locked_url": "https://git.lix.systems/api/v1/repos/lix-project/nix-eval-jobs/archive/57ddb99e781d19704f8a84036f9890e6ca554c41.tar.gz?rev=57ddb99e781d19704f8a84036f9890e6ca554c41", "url": "https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz"}}

View file

@ -1,3 +1,3 @@
{
"version": "2.91.0"
"version": "2.92.0-dev"
}