forked from lix-project/nixos-module
Compare commits
16 commits
fix-build-
...
main
Author | SHA1 | Date | |
---|---|---|---|
crop | a537be487b | ||
jade | d70318fb94 | ||
jade | 587812bdb5 | ||
eldritch horrors | 5d9d94089f | ||
eldritch horrors | f6e6871f38 | ||
jade | 909e593ae9 | ||
jade | 376ecb8038 | ||
jade | b64814c8c1 | ||
jade | 4e25f1ab68 | ||
jade | b4b38e6b5f | ||
jade | 38f31ee7c1 | ||
jade | 12b457c433 | ||
jade | 18fa4a89e2 | ||
jade | 6cd2d62a21 | ||
puck | 53d713eb48 | ||
puck | 36dbb9dbfb |
14
flake.lock
14
flake.lock
|
@ -36,11 +36,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714969435,
|
"lastModified": 1718767907,
|
||||||
"narHash": "sha256-HNIT8NiSZ1qrQMQT69Cr1nIhxrIIqHNPqLlmsVdcl18=",
|
"narHash": "sha256-gpd+mGQxqVHw2kO6rSPQel8TkChHh9UpqxjsmQi0QJM=",
|
||||||
"rev": "106b95904304e498cc6c72aace705441768ab240",
|
"rev": "85f282ef572577899b3d80ba8def1b920a386218",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/106b95904304e498cc6c72aace705441768ab240.tar.gz"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/85f282ef572577899b3d80ba8def1b920a386218.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
@ -49,11 +49,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714906307,
|
"lastModified": 1718530797,
|
||||||
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
|
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
|
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
inputs.flakey-profile.url = "github:lf-/flakey-profile";
|
inputs.flakey-profile.url = "github:lf-/flakey-profile";
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, lix, flake-utils, 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 {
|
in {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
nixosModules.default = import ./module.nix { inherit lix versionSuffix; };
|
nixosModules.default = import ./module.nix { inherit lix versionSuffix; };
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lix, versionSuffix ? "" }:
|
{ lixSrc ? null, versionSuffix ? "" }:
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ (import ./overlay.nix { inherit lix versionSuffix; }) ];
|
nixpkgs.overlays = [ (import ./overlay.nix { inherit lixSrc versionSuffix; }) ];
|
||||||
}
|
}
|
||||||
|
|
126
overlay.nix
126
overlay.nix
|
@ -1,36 +1,25 @@
|
||||||
{ lix, versionSuffix ? "" }:
|
{ lixSrc ? null, versionSuffix ? "" }:
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
boehmgc-patched = ((final.boehmgc.override {
|
|
||||||
enableLargeConfig = true;
|
|
||||||
}).overrideAttrs (o: {
|
|
||||||
# cherrypick: boehmgc: disable tests on aarch64-linux
|
|
||||||
# https://github.com/NixOS/nixpkgs/pull/309418
|
|
||||||
doCheck = !((final.stdenv.isDarwin && final.stdenv.isx86_64) || (final.stdenv.isLinux && final.stdenv.isAarch64));
|
|
||||||
|
|
||||||
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
|
# 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
|
# 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI
|
||||||
# usage.
|
# usage.
|
||||||
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
|
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
|
||||||
lixPkg = (final.callPackage (lix + "/package.nix") {
|
lixPkg =
|
||||||
versionSuffix = "-lix${versionSuffix}";
|
if lixSrc == null
|
||||||
boehmgc-nix = boehmgc-patched;
|
then prev.pkgs.lix
|
||||||
});
|
else
|
||||||
|
final.callPackage (lixSrc + "/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
|
# These packages depend on Nix features that Lix does not support
|
||||||
overridelist_2_18 = [
|
overridelist_2_18 = [
|
||||||
"attic-client"
|
"attic-client"
|
||||||
|
"devenv"
|
||||||
"nix-du"
|
"nix-du"
|
||||||
"nix-init"
|
"nix-init"
|
||||||
"nix-prefetch-git"
|
"nix-prefetch-git"
|
||||||
|
@ -43,43 +32,60 @@ let
|
||||||
nix = final.nixVersions.nix_2_18_upstream;
|
nix = final.nixVersions.nix_2_18_upstream;
|
||||||
});
|
});
|
||||||
|
|
||||||
inherit (prev) lib;
|
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.
|
||||||
|
'';
|
||||||
|
|
||||||
prefetch-npm-deps-args = lib.functionArgs prev.prefetch-npm-deps.override;
|
maybeWarnDuplicate = x: if final.lix-overlay-present > 1 then builtins.trace warning x else x;
|
||||||
in
|
|
||||||
override_2_18 //
|
|
||||||
{
|
|
||||||
# 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 {
|
overlay = override_2_18 // {
|
||||||
# FIXME: do something less scuffed
|
lix-overlay-present = 1;
|
||||||
nix_2_18 = lixPkg;
|
# used for things that one wouldn't necessarily want to update, but we
|
||||||
stable = nix_2_18;
|
# nevertheless shove it in the overlay and fixed-point it in case one *does*
|
||||||
nix_2_18_upstream = prev.nixVersions.nix_2_18;
|
# 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" ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
nix-doc = prev.callPackage ./nix-doc/package.nix { withPlugin = false; };
|
||||||
|
|
||||||
|
pegtl = prev.callPackage ./pegtl.nix { };
|
||||||
};
|
};
|
||||||
|
in
|
||||||
nix-eval-jobs = (prev.nix-eval-jobs.override {
|
# Make the overlay idempotent, since flakes passing nixos modules around by
|
||||||
# lix
|
# value and many other things make it way too easy to include the overlay
|
||||||
nix = final.nixVersions.nix_2_18;
|
# twice
|
||||||
}).overrideAttrs (old: {
|
if (prev ? lix-overlay-present) then { lix-overlay-present = 2; } else overlay
|
||||||
# FIXME: should this be patches instead?
|
|
||||||
src = final.lix-sources.nix-eval-jobs;
|
|
||||||
|
|
||||||
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; };
|
|
||||||
}
|
|
||||||
|
|
23
pegtl.nix
Normal file
23
pegtl.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
{"nix-eval-jobs": {"kind": "tarball", "rev": "02bcbe0c0eb829cc268e9f5c595047f609da9693", "nar_hash": "sha256-v0uj3ZbpSQYz84YGkadDXCZjHBk2xJwHBLY3pkdPrvY=", "locked_url": "https://git.lix.systems/api/v1/repos/lix-project/nix-eval-jobs/archive/02bcbe0c0eb829cc268e9f5c595047f609da9693.tar.gz?rev=02bcbe0c0eb829cc268e9f5c595047f609da9693", "url": "https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz"}}
|
{"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"}}
|
8
pins.nix
8
pins.nix
|
@ -14,11 +14,13 @@ let
|
||||||
narHash = args.nar_hash;
|
narHash = args.nar_hash;
|
||||||
}
|
}
|
||||||
else if kind == "tarball" then
|
else if kind == "tarball" then
|
||||||
builtins.fetchTarball
|
args // {
|
||||||
{
|
outPath = builtins.fetchTarball {
|
||||||
name = "source";
|
name = "source";
|
||||||
url = args.locked_url;
|
url = args.locked_url;
|
||||||
sha256 = args.nar_hash;
|
sha256 = args.nar_hash;
|
||||||
} else builtins.throw "unsupported input type ${kind}";
|
};
|
||||||
|
}
|
||||||
|
else builtins.throw "unsupported input type ${kind}";
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (_: fetchPin) pins
|
builtins.mapAttrs (_: fetchPin) pins
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
let
|
let
|
||||||
configs = {
|
configs = {
|
||||||
it-builds = nixos ({ ... }: {
|
it-builds = nixos ({ ... }: {
|
||||||
|
imports = [ lix-module ];
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
fileSystems."/".device = "ignore-root-device";
|
fileSystems."/".device = "ignore-root-device";
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
|
|
Loading…
Reference in a new issue