Compare commits

...

3 commits

Author SHA1 Message Date
Ilya K 6e97fd4382 Conditionally drop boehm-gc patch, now included in nixpkgs
Not actually included yet
2024-05-04 10:33:25 +03:00
jade a2ef313ace nix flake check should work on mac probably 2024-05-03 17:18:19 -07:00
jade f879988840 Fix NixOS system building and add a flake check that it works
Problem caused by: https://gerrit.lix.systems/c/lix/+/993

But this is actually nixpkgs doing extremely silly feature detection of
Nix based on version which it should /absolutely not be doing/.
2024-05-03 17:13:57 -07:00
4 changed files with 45 additions and 13 deletions

View file

@ -36,11 +36,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1714353561, "lastModified": 1714774053,
"narHash": "sha256-1OKjSB5kPw0Tnm/h4j1IZe6TfdX04QNbm1kn0q58Rls=", "narHash": "sha256-RaiwQCGFhC1WtieS2N3FotIlKSowq+R6ETyY6nZnPh8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "c0733f3cec9e5edd7fa3a4bf156b6ee065762fea", "rev": "549d609a7bce2b4ac28808a76a72d7f3743b9c76",
"revCount": 15448, "revCount": 15471,
"type": "git", "type": "git",
"url": "ssh://git@git.lix.systems/lix-project/lix.git" "url": "ssh://git@git.lix.systems/lix-project/lix.git"
}, },
@ -51,11 +51,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1714253743, "lastModified": 1714635257,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -19,6 +19,13 @@
inherit system; inherit system;
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}; };
linux64BitSystems = [
"x86_64-linux"
"aarch64-linux"
];
inherit (pkgs) lib;
in in
{ {
inherit pkgs; inherit pkgs;
@ -28,5 +35,13 @@
}; };
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; }; packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
nixosTests = pkgs.recurseIntoAttrs (pkgs.callPackage ./test-nixos.nix { lix-module = self.nixosModules.default; });
checks = {
inherit (self.packages.${system}) default nix-eval-jobs;
} // lib.optionalAttrs (lib.elem system linux64BitSystems) {
inherit (self.nixosTests.${system}) it-builds;
};
}); });
} }

View file

@ -8,22 +8,22 @@ let
# for clown reasons this version is newer than the one in lix, we should # for clown reasons this version is newer than the one in lix, we should
# fix this and update our nixpkgs pin # fix this and update our nixpkgs pin
(prev.path + "/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch") (prev.path + "/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch")
] ++ final.lib.optionals (final.lib.versionOlder o.version "8.2.6") [
# https://github.com/ivmai/bdwgc/pull/586 # https://github.com/ivmai/bdwgc/pull/586
(builtins.path { path = lix + "/boehmgc-traceable_allocator-public.diff"; name = "boehmgc-traceable_allocator-public.patch"; }) (builtins.path { path = lix + "/boehmgc-traceable_allocator-public.diff"; name = "boehmgc-traceable_allocator-public.patch"; })
]; ];
}) })
); );
# 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
lixPkg = (final.callPackage (lix + "/package.nix") { lixPkg = (final.callPackage (lix + "/package.nix") {
build-release-notes = false; build-release-notes = false;
versionSuffix = "-lix${versionSuffix}"; versionSuffix = "-lix${versionSuffix}";
boehmgc-nix = boehmgc-patched; 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}";
};
inherit (prev) lib; inherit (prev) lib;
in in

17
test-nixos.nix Normal file
View file

@ -0,0 +1,17 @@
{ nixos, lix-module }:
let
configs = {
it-builds = nixos ({ ... }: {
documentation.enable = false;
fileSystems."/".device = "ignore-root-device";
boot.loader.grub.enable = false;
system.stateVersion = "24.05";
});
};
in
{
inherit configs;
it-builds = configs.it-builds.config.system.build.toplevel;
}