Compare commits

...

27 commits

Author SHA1 Message Date
eldritch horrors 5d9d94089f update nix-eval-jobs for 2.91-dev 2024-06-26 00:18:57 +02:00
eldritch horrors f6e6871f38 add pegtl to overlay for 2.91-dev 2024-06-25 22:00:47 +02:00
jade 909e593ae9 Return Lix module to main, with fixes from release-2.90 work 2024-06-18 23:32:31 -07:00
jade 376ecb8038 restore back to dev state 2024-06-18 23:31:00 -07:00
jade b64814c8c1 Make a working 2.90.0-rc1 overlay 2024-06-18 23:29:08 -07:00
jade 4e25f1ab68 Fix including the overlay twice exploding nixos-option by making it idempotent 2024-06-05 21:15:44 -07:00
jade b4b38e6b5f Update nix-eval-jobs for exploding the C++ API again
lix-project/nix-eval-jobs#7
https://gerrit.lix.systems/c/lix/+/1241/5
2024-05-29 19:39:36 -07:00
jade 38f31ee7c1 Update nix-eval-jobs for fix 2024-05-27 18:40:58 -06:00
jade 12b457c433 Show revision of n-e-j better 2024-05-27 13:03:12 -06:00
jade 18fa4a89e2 update lix and n-e-j in light of lix-project/nix-eval-jobs#5 2024-05-23 16:27:31 -07:00
jade 6cd2d62a21 add dirtyShortRev to make it work better 2024-05-23 16:25:45 -07:00
puck 53d713eb48 feat: add devenv to override list
Devenv overrides the Nix source with its own version of Nix 2.21, which
conflicts with the changes made to the package, especially the build
system.
2024-05-16 18:47:30 +00:00
puck 36dbb9dbfb Fix build-release-notes being required
This allows using versions of Lix earlier from before
8822fd7dd5254e781660704858f2eca386bdf5a2 again.
2024-05-16 12:43:22 +00:00
jade fbc1c1c4da Merge pull request 'Don't pass in 'false' as the value of build-release-notes (a drv)' (#28) from midnightveil/nixos-module:build-release-notes-is-a-drv into main
Reviewed-on: #28
2024-05-16 02:03:47 +00:00
julia 0c38126b49
Don't pass in 'false' as the value of build-release-notes (a drv)
7cfaf057e35b7bb329ffff344e30fdfc850566c3 in lix-project changed the
default there to always build the release notes anyway, so this
caused failures to build, as false is not a derivation.
2024-05-16 11:28:12 +10:00
puck 7e8a5498db Fix prefetch-npm-deps override when functionArgs is not supported 2024-05-15 19:35:30 +00:00
raito 87b7b7e4bd pins: update nix-eval-jobs
To obtain lix-project/nix-eval-jobs#3
fix.

Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-11 17:52:03 +02:00
jade c8ab1e79ba Merge pull request 'cherrypick: "boehmgc: disable tests on aarch64-linux"' (#21) from ckiee/nixos-module:cherry-boehm-check into main
Reviewed-on: #21
2024-05-09 18:11:51 +00:00
jade d15ff50703 Merge pull request 'feat: Add overrides for incompatible packages' (#27) from arcuru/nixos-module:override into main
Reviewed-on: #27
2024-05-08 21:11:43 +00:00
Patrick Jackson 5ef5fe6a67 feat: add reported broken packages 2024-05-08 07:58:24 -07:00
Patrick Jackson e09758962c refactor: move simple overrides to a function 2024-05-08 07:50:20 -07:00
jade aaf759cd93 Switch to tarball fetching because it is cheaper 2024-05-06 16:43:03 -07:00
jade 72060dfb08 Merge pull request 'fix: allow fetching nix-eval-jobs anonymously' (#23) from nogit-urls into main
Reviewed-on: #23
2024-05-06 23:06:29 +00:00
Lunaphied 10e849bdce Merge pull request 'chore(inputs): use git+https://' (#26) from flake-input-with-git into main
Reviewed-on: #26
2024-05-06 21:49:58 +00:00
raito ef84a1e4b3 fix: allow fetching nix-eval-jobs anonymously
Use HTTPS URL. Fixes #22.

Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-06 23:46:37 +02:00
raito 0bb33a2305 feat: make the script autonomous in its python dependencies
Let's use a nix-shell shebang!

Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-06 23:46:37 +02:00
mei (ckie) 9837ede4bd
cherrypick: "boehmgc: disable tests on aarch64-linux"
Is a big rebuild for upstream but here it's okay.
2024-05-06 04:28:24 +03:00
8 changed files with 133 additions and 94 deletions

View file

@ -36,26 +36,24 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1714969435,
"narHash": "sha256-HNIT8NiSZ1qrQMQT69Cr1nIhxrIIqHNPqLlmsVdcl18=",
"ref": "refs/heads/main",
"rev": "106b95904304e498cc6c72aace705441768ab240",
"revCount": 15502,
"type": "git",
"url": "https://git.lix.systems/lix-project/lix.git"
"lastModified": 1718767907,
"narHash": "sha256-gpd+mGQxqVHw2kO6rSPQel8TkChHh9UpqxjsmQi0QJM=",
"rev": "85f282ef572577899b3d80ba8def1b920a386218",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/85f282ef572577899b3d80ba8def1b920a386218.tar.gz"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/lix.git"
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714635257,
"narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=",
"lastModified": 1718530797,
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f",
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
"type": "github"
},
"original": {

View file

@ -1,14 +1,14 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.lix = {
url = "git+https://git.lix.systems/lix-project/lix.git";
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
inputs.flake-utils.url = "github:numtide/flake-utils";
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}";
let versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
in {
inherit inputs;
nixosModules.default = import ./module.nix { inherit lix versionSuffix; };

View file

@ -1,85 +1,99 @@
{ lix, versionSuffix ? "" }:
final: prev:
let
boehmgc-patched = ((final.boehmgc.override {
enableLargeConfig = true;
}).overrideAttrs (o: {
patches = (o.patches or [ ]) ++ [
# for clown reasons this version is newer than the one in lix, we should
# fix this and update our nixpkgs pin
(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
(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") {
build-release-notes = false;
versionSuffix = "-lix${versionSuffix}";
boehmgc-nix = boehmgc-patched;
lixPkg = final.callPackage (lix + "/package.nix") ({
versionSuffix = "-${versionSuffix}";
# FIXME: do this more sensibly for future releases
# https://git.lix.systems/lix-project/lix/issues/406
officialRelease = false;
});
# These packages depend on Nix features that Lix does not support
overridelist_2_18 = [
"attic-client"
"devenv"
"nix-du"
"nix-init"
"nix-prefetch-git"
"nixos-option"
"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;
prefetch-npm-deps-args = lib.functionArgs prev.prefetch-npm-deps.override;
warning = ''
warning: You have the lix overlay included into a nixpkgs import twice,
perhaps due to the NixOS module being included twice, or because of using
pkgs.nixos and also including it in imports, or perhaps some unknown
machinations of a complicated flake library.
This is completely harmless since we have no-op'd the second one if you are
seeing this message, but it would be a small style improvement to fix
it :)
P.S. If you had some hack to fix nixos-option build failures in your
configuration, that was caused by including an older version of the lix
overlay twice, which is now mitigated if you see this message, so you can
delete that.
P.P.S. This Lix has super catgirl powers.
'';
maybeWarnDuplicate = x: if final.lix-overlay-present > 1 then builtins.trace warning x else x;
overlay = override_2_18 // {
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*
# want to do that.
lix-sources = import ./pins.nix;
nixVersions = prev.nixVersions // rec {
# FIXME: do something less scuffed
nix_2_18 = maybeWarnDuplicate lixPkg;
stable = nix_2_18;
nix_2_18_upstream = prev.nixVersions.nix_2_18;
};
nix-eval-jobs = (prev.nix-eval-jobs.override {
# lix
nix = final.nixVersions.nix_2_18;
}).overrideAttrs (old:
let src = final.lix-sources.nix-eval-jobs;
in {
version = "2.90.0-lix-${builtins.substring 0 7 src.rev}";
# FIXME: should this be patches instead?
inherit src;
mesonBuildType = "debugoptimized";
ninjaFlags = old.ninjaFlags or [ ] ++ [ "-v" ];
}
);
# support both having and missing https://github.com/NixOS/nixpkgs/pull/304913
prefetch-npm-deps =
if (prefetch-npm-deps-args ? nix) || (prefetch-npm-deps-args == {})
then prev.prefetch-npm-deps.override {
nix = final.nixVersions.nix_2_18_upstream;
}
else prev.prefetch-npm-deps;
nix-doc = prev.callPackage ./nix-doc/package.nix { withPlugin = false; };
pegtl = prev.callPackage ./pegtl.nix { };
};
in
{
# 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*
# want to do that.
lix-sources = import ./pins.nix;
nixVersions = prev.nixVersions // rec {
# FIXME: do something less scuffed
nix_2_18 = lixPkg;
stable = nix_2_18;
nix_2_18_upstream = prev.nixVersions.nix_2_18;
};
nix-eval-jobs = (prev.nix-eval-jobs.override {
# lix
nix = final.nixVersions.nix_2_18;
}).overrideAttrs (old: {
# FIXME: should this be patches instead?
src = final.lix-sources.nix-eval-jobs;
mesonBuildType = "debugoptimized";
ninjaFlags = old.ninjaFlags or [ ] ++ [ "-v" ];
});
# force these onto upstream so we are not regularly rebuilding electron
prefetch-yarn-deps = prev.prefetch-yarn-deps.override {
nix = final.nixVersions.nix_2_18_upstream;
};
# support both having and missing https://github.com/NixOS/nixpkgs/pull/304913
prefetch-npm-deps =
if (lib.functionArgs prev.prefetch-npm-deps.override) ? nix
then prev.prefetch-npm-deps.override {
nix = final.nixVersions.nix_2_18_upstream;
}
else prev.prefetch-npm-deps;
nix-prefetch-git = prev.nix-prefetch-git.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nixos-option = prev.nixos-option.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nix-doc = prev.callPackage ./nix-doc/package.nix { withPlugin = false; };
nix-init = prev.nix-init.override {
nix = final.nixVersions.nix_2_18_upstream;
};
nurl = prev.nurl.override {
nix = final.nixVersions.nix_2_18_upstream;
};
}
# Make the overlay idempotent, since flakes passing nixos modules around by
# value and many other things make it way too easy to include the overlay
# twice
if (prev ? lix-overlay-present) then { lix-overlay-present = 2; } else overlay

23
pegtl.nix Normal file
View file

@ -0,0 +1,23 @@
{
stdenv,
cmake,
ninja,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "pegtl";
version = "3.2.7";
src = fetchFromGitHub {
repo = "PEGTL";
owner = "taocpp";
rev = "refs/tags/3.2.7";
hash = "sha256-IV5YNGE4EWVrmg2Sia/rcU8jCuiBynQGJM6n3DCWTQU=";
};
nativeBuildInputs = [
cmake
ninja
];
}

View file

@ -1 +1 @@
{"nix-eval-jobs": {"kind": "git", "rev": "793841a9b7b689e37c9a7902710aab2bd6a833d5", "nar_hash": "sha256-hUYgXLE0+zOkGPXXwiVPYAZBQ5Es9OOkm800puk7a94=", "url": "git@git.lix.systems:lix-project/nix-eval-jobs", "ref": "main"}}
{"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"}}

View file

@ -14,11 +14,13 @@ let
narHash = args.nar_hash;
}
else if kind == "tarball" then
builtins.fetchTarball
{
args // {
outPath = builtins.fetchTarball {
name = "source";
url = args.locked_url;
sha256 = args.nar_hash;
} else builtins.throw "unsupported input type ${kind}";
};
}
else builtins.throw "unsupported input type ${kind}";
in
builtins.mapAttrs (_: fetchPin) pins

View file

@ -2,6 +2,7 @@
let
configs = {
it-builds = nixos ({ ... }: {
imports = [ lix-module ];
documentation.enable = false;
fileSystems."/".device = "ignore-root-device";
boot.loader.grub.enable = false;

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p 'python3.withPackages (ps: [ ps.requests ])'
"""
Updates pins in this repo to their latest version.
@ -146,7 +147,7 @@ def lock_git(url, branch) -> GitPinSerialized:
PINS = {
'nix-eval-jobs':
GitPinSpec('git@git.lix.systems:lix-project/nix-eval-jobs', 'main')
TarballPinSpec('https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz')
}