Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maintainers/team-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ with lib.maintainers;
qyriad
_9999years
lf-
alois31
];
scope = "Maintain the Lix package manager inside of Nixpkgs.";
shortName = "Lix ecosystem";
Expand Down
13 changes: 8 additions & 5 deletions nixos/tests/installer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ let
grubUseEfi ? false,
enableOCR ? false,
meta ? { },
passthru ? { },
testSpecialisationConfig ? false,
testFlakeSwitch ? false,
testByAttrSwitch ? false,
Expand All @@ -644,7 +645,7 @@ let
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
in
makeTest {
inherit enableOCR;
inherit enableOCR passthru;
name = "installer-" + name;
meta = {
# put global maintainers here, individuals go into makeInstallerTest fkt call
Expand Down Expand Up @@ -1109,10 +1110,12 @@ in

# The (almost) simplest partitioning scheme: a swap partition and
# one big filesystem partition.
simple = makeInstallerTest "simple" simple-test-config;
lix-simple = makeInstallerTest "simple" simple-test-config // {
selectNixPackage = pkgs: pkgs.lix;
};
simple = makeInstallerTest "simple" (
simple-test-config
// {
passthru.override = args: makeInstallerTest "simple" simple-test-config // args;
}
);

switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;

Expand Down
20 changes: 8 additions & 12 deletions nixos/tests/nix/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@

let
inherit (pkgs) lib;
tests = {
default = testsForPackage { nixPackage = pkgs.nix; };
lix = testsForPackage { nixPackage = pkgs.lix; };
};
tests.default = testsForPackage { nixPackage = pkgs.nix; };

testsForPackage =
args:
lib.recurseIntoAttrs {
# If the attribute is not named 'test'
# You will break all the universe on the release-*.nix side of things.
# `discoverTests` relies on `test` existence to perform a `callTest`.
test = testMiscFeatures args;
passthru.override = args': testsForPackage (args // args');
testsForPackage = args: {
# If the attribute is not named 'test'
# You will break all the universe on the release-*.nix side of things.
# `discoverTests` relies on `test` existence to perform a `callTest`.
test = testMiscFeatures args // {
passthru.override = args': (testsForPackage (args // args')).test;
};
};

testMiscFeatures =
{ nixPackage, ... }:
Expand Down
21 changes: 18 additions & 3 deletions pkgs/tools/package-management/lix/common-lix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ assert lib.assertMsg (
libarchive,
libcpuid,
libsodium,
libsystemtap,
llvmPackages,
lowdown,
lowdown-unsandboxed,
Expand All @@ -59,9 +60,11 @@ assert lib.assertMsg (
pkg-config,
rapidcheck,
sqlite,
systemtap-sdt,
util-linuxMinimal,
removeReferencesTo,
xz,
yq,
nixosTests,
rustPlatform,
# Only used for versions before 2.92.
Expand All @@ -76,6 +79,10 @@ assert lib.assertMsg (
enableStrictLLVMChecks ? true,
withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin),
aws-sdk-cpp,
# FIXME support Darwin once https://github.com/NixOS/nixpkgs/pull/392918 lands
withDtrace ?
lib.meta.availableOn stdenv.hostPlatform libsystemtap
&& lib.meta.availableOn stdenv.buildPlatform systemtap-sdt,
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp,
libseccomp,
Expand All @@ -88,6 +95,8 @@ let
isLLVMOnly = lib.versionAtLeast version "2.92";
hasExternalLixDoc = lib.versionOlder version "2.92";
isLegacyParser = lib.versionOlder version "2.91";
hasDtraceSupport = lib.versionAtLeast version "2.93";
parseToYAML = lib.versionAtLeast version "2.93";
in
# gcc miscompiles coroutines at least until 13.2, possibly longer
# do not remove this check unless you are sure you (or your users) will not report bugs to Lix upstream about GCC miscompilations.
Expand Down Expand Up @@ -159,6 +168,8 @@ stdenv.mkDerivation (finalAttrs: {
mdbook-linkcheck
doxygen
]
++ lib.optionals (hasDtraceSupport && withDtrace) [ systemtap-sdt ]
++ lib.optionals parseToYAML [ yq ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, can you remind me why we depend on yq? i actually don't remember how that got in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency was introduced in https://gerrit.lix.systems/c/lix/+/2190 for some parser tests so that the output is more readable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah that's a little bit silly of us since we probably should just use PyYAML instead which we already depend on but oh well.

++ lib.optionals stdenv.hostPlatform.isLinux [ util-linuxMinimal ];

buildInputs =
Expand Down Expand Up @@ -187,7 +198,8 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals stdenv.hostPlatform.isStatic [ llvmPackages.libunwind ]
++ lib.optionals (stdenv.hostPlatform.isx86_64) [ libcpuid ]
++ lib.optionals withLibseccomp [ libseccomp ]
++ lib.optionals withAWS [ aws-sdk-cpp ];
++ lib.optionals withAWS [ aws-sdk-cpp ]
++ lib.optionals (hasDtraceSupport && withDtrace) [ libsystemtap ];

inherit cargoDeps;

Expand Down Expand Up @@ -256,6 +268,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonOption "state-dir" stateDir)
(lib.mesonOption "sysconfdir" confDir)
]
++ lib.optionals hasDtraceSupport [
(lib.mesonEnable "dtrace-probes" withDtrace)
]
++ lib.optionals stdenv.hostPlatform.isLinux [
(lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox")
];
Expand Down Expand Up @@ -347,8 +362,8 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
inherit aws-sdk-cpp boehmgc;
tests = {
misc = nixosTests.nix-misc.lix;
installer = nixosTests.installer.lix-simple;
misc = nixosTests.nix-misc.default.passthru.override { nixPackage = finalAttrs.finalPackage; };
installer = nixosTests.installer.simple.override { selectNixPackage = _: finalAttrs.finalPackage; };
};
};

Expand Down
16 changes: 11 additions & 5 deletions pkgs/tools/package-management/lix/common-nix-eval-jobs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
lib,
lix,
boost,
capnproto,
nlohmann_json,
meson,
pkg-config,
Expand All @@ -23,11 +24,16 @@ stdenv.mkDerivation {
pname = "nix-eval-jobs";
version = "${version}${suffix}";
inherit src patches;
buildInputs = [
nlohmann_json
lix
boost
];
sourceRoot = if lib.versionAtLeast version "2.93" then "source/subprojects/nix-eval-jobs" else null;
buildInputs =
[
nlohmann_json
lix
boost
]
++ lib.optionals (lib.versionAtLeast version "2.93") [
capnproto
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, i suspect we will need a lix branded capnproto package really soon if not now, due to patches we're doing to it. need to check details though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library is already used by Lix itself. This only adds the dependency to nix-eval-jobs which started depending on canproto headers due to the async changes. If a special capnproto build is needed that could be handled similar to boehmgc, aws-sdk-cpp and editline so that it is picked up by both.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay! that should be fine then. we could potentially address this need via propagated build inputs as well; the only reason i was a little shaky on wanting to do it as propagated is that it would also affect derivations using lix only for the cli.

either approach is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, I think it might even have been me who suggested making it propagated. I decided to add it to nix-eval-jobs for now at least since that's also done in the vendored packaging.

];
nativeBuildInputs = [
meson
pkg-config
Expand Down
Loading