Compare commits
1 commit
main
...
fix-prefet
Author | SHA1 | Date | |
---|---|---|---|
puck | 1cb0b0434d |
76
README.md
76
README.md
|
@ -1,79 +1,5 @@
|
|||
# Lix NixOS module
|
||||
|
||||
See the [official installation guide][install-guide] for details on usage of
|
||||
release versions.
|
||||
|
||||
[install-guide]: https://lix.systems/install/
|
||||
|
||||
See the [beta guide][beta-guide] for a setup guide on how to use HEAD:
|
||||
See the [beta guide][beta-guide] for details on how to use this:
|
||||
|
||||
[beta-guide]: https://wiki.lix.systems/link/1
|
||||
|
||||
## What does this do?
|
||||
|
||||
This is an overlay wrapped in a NixOS module that will replace CppNix with Lix
|
||||
in nixpkgs. This is useful so that `nixos-rebuild`, `nix-direnv` and similar
|
||||
will use Lix.
|
||||
|
||||
Optionally, it can build Lix from source.
|
||||
|
||||
## Versioning with Lix
|
||||
|
||||
The version of this overlay should match the major Lix version, *and* if
|
||||
running HEAD, it should be the latest available version of the overlay.
|
||||
Changes breaking the overlay are shamelessly done on HEAD, and we expect people
|
||||
doing such changes to have prepared corresponding fix commits to make to the
|
||||
overlay immediately after submitting their changes. If your build randomly
|
||||
broke when updating HEAD, try updating your overlay.
|
||||
|
||||
The version of Lix pinned in this flake's `flake.lock` is a version of Lix
|
||||
that is expected to work, however if running HEAD, it can be assumed to work
|
||||
with HEAD as well if both `lix-nixos-module` and `lix` are the latest version.
|
||||
|
||||
## Common pitfalls
|
||||
|
||||
Various flake frameworks such as flake-parts and snowfall (and possibly Colmena
|
||||
in the future if they do a similar optimization) manage overlays separately
|
||||
from NixOS, since they provide `pkgs` pre-imported to NixOS. This saves a
|
||||
couple of seconds of evaluation time and resources, but it means that the NixOS
|
||||
option `nixpkgs.overlays` **is completely ignored** on these frameworks.
|
||||
|
||||
If you are using such a framework, add `overlays.default` to the overlays list
|
||||
for said framework.
|
||||
|
||||
## Flake structure and usage
|
||||
|
||||
The flake here has two inputs of note:
|
||||
- `nixpkgs`, *which is unused for most people*. It is purely used for `checks`
|
||||
in developing `lix-nixos-module` itself.
|
||||
|
||||
The installation instructions make it `follows` to make `flake.lock` less
|
||||
confusing, but it is nonetheless unused.
|
||||
- `lix`, which determines the version of Lix to do source builds for, if doing
|
||||
source builds.
|
||||
|
||||
These are the most relevant outputs for most people:
|
||||
|
||||
- `nixosModules.lixFromNixpkgs` - uses Lix from nixpkgs and installs the
|
||||
overlay to use Lix on a NixOS system. This is only useful for a stable
|
||||
version of Lix, and cannot be used for running HEAD.
|
||||
- `nixosModules.default` - uses Lix from source and installs the overlay to use
|
||||
Lix on a NixOS system.
|
||||
- `overlays.lixFromNixpkgs` - overlay to use Lix from nixpkgs in place of Nix.
|
||||
- `overlays.default` - overlay to use Lix from source in place of Nix.
|
||||
|
||||
## Non-flake usage
|
||||
|
||||
Import `module.nix` or `overlay.nix` as desired, with the arguments `lix`
|
||||
(derivation-like attribute set with the Lix sources, or `null` to use Lix from
|
||||
nixpkgs) and `versionSuffix` (optional string).
|
||||
|
||||
It's desirable to also include a `versionSuffix` like the following while
|
||||
building HEAD from source, to have `nix --version` include date and commit
|
||||
information. To get such metadata, it depends on which pinning system is in
|
||||
use, but `builtins.fetchGit` will provide the necessary metadata for the
|
||||
following to work:
|
||||
|
||||
```
|
||||
versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
|
||||
```
|
||||
|
|
20
flake.lock
20
flake.lock
|
@ -5,11 +5,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -36,11 +36,11 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733448312,
|
||||
"narHash": "sha256-id5U81bzXk/Lg900nGLM4CQb0wmTdzIvQz7CZk2OcTM=",
|
||||
"rev": "2a9e560570982a91937d199af3e7b7a8f3cbe14b",
|
||||
"lastModified": 1714969435,
|
||||
"narHash": "sha256-HNIT8NiSZ1qrQMQT69Cr1nIhxrIIqHNPqLlmsVdcl18=",
|
||||
"rev": "106b95904304e498cc6c72aace705441768ab240",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2a9e560570982a91937d199af3e7b7a8f3cbe14b.tar.gz?rev=2a9e560570982a91937d199af3e7b7a8f3cbe14b"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/106b95904304e498cc6c72aace705441768ab240.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
@ -49,11 +49,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1733392399,
|
||||
"narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
|
||||
"lastModified": 1714906307,
|
||||
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
|
||||
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
31
flake.nix
31
flake.nix
|
@ -8,28 +8,11 @@
|
|||
inputs.flakey-profile.url = "github:lf-/flakey-profile";
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, lix, flake-utils, flakey-profile, ... }:
|
||||
let
|
||||
lixVersionJson = builtins.fromJSON (builtins.readFile (lix + "/version.json"));
|
||||
versionSuffix = nixpkgs.lib.optionalString (!lixVersionJson.official_release)
|
||||
"-pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
|
||||
in
|
||||
{
|
||||
let versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev}";
|
||||
in {
|
||||
inherit inputs;
|
||||
nixosModules = {
|
||||
# Use a locally built Lix
|
||||
default = import ./module.nix { inherit lix versionSuffix; };
|
||||
|
||||
# Use Lix from nixpkgs
|
||||
lixFromNixpkgs = import ./module.nix { lix = null; };
|
||||
};
|
||||
|
||||
overlays = {
|
||||
# Use a locally built Lix
|
||||
default = import ./overlay.nix { inherit lix versionSuffix; };
|
||||
|
||||
# Use Lix from nixpkgs
|
||||
lixFromNixpkgs = import ./overlay.nix { lix = null; };
|
||||
};
|
||||
nixosModules.default = import ./module.nix { inherit lix versionSuffix; };
|
||||
overlays.default = import ./overlay.nix { inherit lix versionSuffix; };
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -47,19 +30,17 @@
|
|||
{
|
||||
inherit pkgs;
|
||||
packages = {
|
||||
default = pkgs.nix;
|
||||
default = pkgs.nixVersions.nix_2_18;
|
||||
inherit (pkgs) nix-doc nix-eval-jobs;
|
||||
};
|
||||
|
||||
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
|
||||
|
||||
nixosTests = pkgs.recurseIntoAttrs (pkgs.callPackage ./test-nixos.nix { inherit pkgs; lix-module = self.nixosModules.default; });
|
||||
nixosTests = pkgs.recurseIntoAttrs (pkgs.callPackage ./test-nixos.nix { lix-module = self.nixosModules.default; });
|
||||
|
||||
checks = {
|
||||
inherit (self.packages.${system}) default nix-eval-jobs;
|
||||
inherit (pkgs) nixos-option nix-doc nixd nixt;
|
||||
} // lib.optionalAttrs (lib.elem system linux64BitSystems) {
|
||||
# wrongMajor intentionally not included here since it is expected to fail
|
||||
inherit (self.nixosTests.${system}) it-builds;
|
||||
};
|
||||
});
|
||||
|
|
64
nix-doc/package.nix
Normal file
64
nix-doc/package.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Temporary replacement of the nix-doc package with
|
||||
# https://github.com/NixOS/nixpkgs/pull/296523 so that we can have working Lix
|
||||
# with nix-doc on 23.11 and 24.05-pre
|
||||
#
|
||||
# Can be removed when that commit is in 23.11 and 24.05-pre, or 24.05 is
|
||||
# released with the commit.
|
||||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, boost
|
||||
, nix
|
||||
, pkg-config
|
||||
# Whether to build the nix-doc plugin for Nix
|
||||
, withPlugin ? true
|
||||
}:
|
||||
|
||||
let
|
||||
packageFlags = [ "-p" "nix-doc" ] ++ lib.optionals withPlugin [ "-p" "nix-doc-plugin" ];
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nix-doc";
|
||||
version = "0.6.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "lf-";
|
||||
repo = "nix-doc";
|
||||
sha256 = "sha256-9cuNzq+CBA2jz0LkZb7lh/WISIlKklfovGBAbSo1Mgk=";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
buildInputs = lib.optionals withPlugin [ boost nix ];
|
||||
|
||||
nativeBuildInputs = lib.optionals withPlugin [ pkg-config nix ];
|
||||
|
||||
cargoBuildFlags = packageFlags;
|
||||
cargoTestFlags = packageFlags;
|
||||
|
||||
# Packaging support for making the nix-doc plugin load cleanly as a no-op on
|
||||
# the wrong Nix version (disabling bindnow permits loading libraries
|
||||
# requiring unavailable symbols if they are unreached)
|
||||
hardeningDisable = lib.optionals withPlugin [ "bindnow" ];
|
||||
# Due to a Rust bug, setting -Z relro-level to anything including "off" on
|
||||
# macOS will cause link errors
|
||||
env = lib.optionalAttrs (withPlugin && stdenv.isLinux) {
|
||||
# nix-doc does not use nightly features, however, there is no other way to
|
||||
# set relro-level
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
RUSTFLAGS = "-Z relro-level=partial";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-CHagzXTG9AfrFd3WmHanQ+YddMgmVxSuB8vK98A1Mlw=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "An interactive Nix documentation tool";
|
||||
longDescription = "An interactive Nix documentation tool providing a CLI for function search, a Nix plugin for docs in the REPL, and a ctags implementation for Nix script";
|
||||
homepage = "https://github.com/lf-/nix-doc";
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = [ maintainers.lf- ];
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "nix-doc";
|
||||
};
|
||||
}
|
181
overlay.nix
181
overlay.nix
|
@ -1,129 +1,86 @@
|
|||
{ lix, versionSuffix ? "" }:
|
||||
final: prev:
|
||||
let
|
||||
lixPackageFromSource = final.callPackage (lix + "/package.nix") ({
|
||||
inherit versionSuffix;
|
||||
stdenv = final.clangStdenv;
|
||||
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
|
||||
# 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;
|
||||
});
|
||||
|
||||
# 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 = [
|
||||
# These packages depend on Nix features that Lix does not support
|
||||
overridelist_2_18 = [
|
||||
"attic-client"
|
||||
"devenv"
|
||||
"nix-du"
|
||||
"nix-init"
|
||||
"nix-prefetch-git"
|
||||
"nixd"
|
||||
"nixos-option"
|
||||
"nixt"
|
||||
"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;
|
||||
|
||||
csi = builtins.fromJSON ''"\u001b"'';
|
||||
orange = "${csi}[35;1m";
|
||||
normal = "${csi}[0m";
|
||||
warning = ''
|
||||
${orange}warning${normal}: 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.
|
||||
'';
|
||||
wrongMajorWarning = ''
|
||||
${orange}warning${normal}: This Lix NixOS module is being built against a Lix with a
|
||||
major version (got ${lixPackageToUse.version}) other than the one the
|
||||
module was designed for (expecting ${supportedLixMajor}). Some downstream
|
||||
packages like nix-eval-jobs may be broken by this. Consider using a
|
||||
matching version of the Lix NixOS module to the version of Lix you are
|
||||
using.
|
||||
'';
|
||||
|
||||
maybeWarnDuplicate = x: if final.lix-overlay-present > 1 then builtins.trace warning x else x;
|
||||
|
||||
versionJson = builtins.fromJSON (builtins.readFile ./version.json);
|
||||
supportedLixMajor = lib.versions.majorMinor versionJson.version;
|
||||
lixPackageToUse = if lix != null then lixPackageFromSource else prev.lix;
|
||||
# Especially if using Lix from nixpkgs, it is plausible that the overlay
|
||||
# could be used against the wrong Lix major version and cause confusing build
|
||||
# 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;
|
||||
|
||||
# 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*
|
||||
# want to do that.
|
||||
lix-sources = import ./pins.nix;
|
||||
|
||||
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);
|
||||
|
||||
nixVersions = prev.nixVersions // {
|
||||
stable = final.lix;
|
||||
stable_upstream = prev.nixVersions.stable;
|
||||
};
|
||||
|
||||
nix-eval-jobs = (prev.nix-eval-jobs.override {
|
||||
# lix
|
||||
nix = final.lix;
|
||||
}).overrideAttrs (old:
|
||||
let src = final.lix-sources.nix-eval-jobs;
|
||||
in {
|
||||
version = "2.92.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.nix-doc.override { withPlugin = false; };
|
||||
};
|
||||
prefetch-npm-deps-args = lib.functionArgs prev.prefetch-npm-deps.override;
|
||||
in
|
||||
# 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
|
||||
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 {
|
||||
# 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" ];
|
||||
});
|
||||
|
||||
# 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; };
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"nix-eval-jobs": {"kind": "tarball", "rev": "df3edf37301cdc77ca5bd5f3f6fcccd6d0befee5", "nar_hash": "sha256-KpKmFgcUGQlAWhLUHyBn3AnTJLp7Kt82q2Cxfp3Yf44=", "locked_url": "https://git.lix.systems/api/v1/repos/lix-project/nix-eval-jobs/archive/df3edf37301cdc77ca5bd5f3f6fcccd6d0befee5.tar.gz?rev=df3edf37301cdc77ca5bd5f3f6fcccd6d0befee5", "url": "https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz"}}
|
||||
{"nix-eval-jobs": {"kind": "tarball", "rev": "793841a9b7b689e37c9a7902710aab2bd6a833d5", "nar_hash": "sha256-hUYgXLE0+zOkGPXXwiVPYAZBQ5Es9OOkm800puk7a94=", "locked_url": "https://git.lix.systems/api/v1/repos/lix-project/nix-eval-jobs/archive/793841a9b7b689e37c9a7902710aab2bd6a833d5.tar.gz?rev=793841a9b7b689e37c9a7902710aab2bd6a833d5", "url": "https://git.lix.systems/lix-project/nix-eval-jobs/archive/main.tar.gz"}}
|
8
pins.nix
8
pins.nix
|
@ -14,13 +14,11 @@ let
|
|||
narHash = args.nar_hash;
|
||||
}
|
||||
else if kind == "tarball" then
|
||||
args // {
|
||||
outPath = builtins.fetchTarball {
|
||||
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
|
||||
|
|
|
@ -1,32 +1,17 @@
|
|||
{ pkgs, nixos, lix-module }:
|
||||
{ nixos, lix-module }:
|
||||
let
|
||||
pkgs' = import pkgs.path {
|
||||
inherit (pkgs) system;
|
||||
};
|
||||
configs = {
|
||||
it-builds = nixos ({ ... }: {
|
||||
imports = [ lix-module ];
|
||||
documentation.enable = false;
|
||||
fileSystems."/".device = "ignore-root-device";
|
||||
boot.loader.grub.enable = false;
|
||||
system.stateVersion = "24.05";
|
||||
});
|
||||
|
||||
# Intentionally provoke the wrong major version.
|
||||
# Does assume that the module is one major ahead of the release; the main
|
||||
# purpose here is a manual testing fixture.
|
||||
wrongMajor = pkgs'.nixos ({ ... }: {
|
||||
imports = [ (import ./module.nix { lix = null; }) ];
|
||||
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;
|
||||
wrongMajor = configs.wrongMajor.config.system.build.toplevel;
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"version": "2.92.0-dev"
|
||||
}
|
Loading…
Reference in a new issue