Commit graph

614 commits

Author SHA1 Message Date
Maximilian Bosch c39b8027dc
flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1' (2024-10-01)
  → 'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90' (2024-11-01)
• Updated input 'lix':
    '2734a9cf94.tar.gz?narHash=sha256-XME7TzBvjK6GEmZqPLK%2B2%2BWk0qnwc7DCwYH434hMcOM%3D&rev=2734a9cf94debc6baef4e7d4d9fa28cc28f5b31d' (2024-10-23)
  → 'c859d03013.tar.gz?narHash=sha256-bq21I1EjXJa/s5Rra9J9ot2NkPCnI0F5uNPurwYLdpE%3D&rev=c859d03013712b349d82ee6223948d6d03e63a8d' (2024-11-15)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/45e5197248e59e92e88956c5aa12553a7f62337f' (2024-10-25)
  → 'github:NixOS/nixpkgs/035d434d48f4375ac5d3a620954cf5fda7dd7c36' (2024-11-15)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/aac86347fb5063960eccb19493e0cadcdb4205ca' (2024-10-22)
  → 'github:numtide/treefmt-nix/746901bb8dba96d154b66492a29f5db0693dbfcc' (2024-10-30)
2024-11-16 22:15:02 +01:00
jade 57ddb99e78 Merge pull request 'update and fix build with latest Lix' (#14) from fixes/build-settings-opeq into main
Reviewed-on: lix-project/nix-eval-jobs#14
2024-11-09 20:50:43 +00:00
jade 9160d40f80 Address feedback from alois31
- Remove restrict-eval stuff that did nothing
- Remove builders stuff that appears unnecessary:

/* FIXME: The build hook in conjunction with import-from-derivation is
 * causing "unexpected EOF" during eval */
settings.builders.setDefault("");

We removed that line and then observed that it works, so idk:

ifdtest.nix:

let
  ifd = builtins.derivation {
    name = "wat2";
    builder = "/bin/sh";
    args = [ "-c" "echo meow > $out" ];
    system = "aarch64-linux";
  };
in
  builtins.readFile ifd

 » NIX_CONFIG="builders = @/etc/nix/machines" build/src/nix-eval-jobs ifdtest.nix
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
building '/nix/store/xxnd5rb49n3anyla5v71lgdk0wmhmijp-wat2.drv' on 'ssh-ng://root@voracle.jade.fyi'...
copying 0 paths...
building '/nix/store/xxnd5rb49n3anyla5v71lgdk0wmhmijp-wat2.drv'...
copying 1 paths...
copying path '/nix/store/h2yxq9lb7l0nd9plgqrcgf7nvsg67gl7-wat2' from 'ssh-ng://root@voracle.jade.fyi'...

- Changed the impure/flake code to override the pureEval setting, which
  it was definitely *supposed* to be doing in the first place.
2024-11-09 12:46:21 -08:00
Qyriad 43aaa943bf fix build with latest Lix
Lix commit 4dbbd721e[1] changed the way settings are changed, removing
operator= in the process. This commit changes the places where we use
operator= to using either setDefault(), or override(). I *believe* I
have used the correct ones for each changed setting.

Fixes #13.

[1]: 4dbbd721eb9db75d4968a624b8cb9e75e979a144
2024-10-25 14:29:57 -06:00
Qyriad 50a1455953 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01)
  → 'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1' (2024-10-01)
• Updated input 'lix':
    'b016eb0895.tar.gz?narHash=sha256-kOpGI9WPmte1L4QWHviuXsr8jxmGn27zwi82jtzYObM%3D&rev=b016eb0895bb6714a4f6530d9a2bb6577ac6c3cf' (2024-08-13)
  → '2734a9cf94.tar.gz?narHash=sha256-XME7TzBvjK6GEmZqPLK%2B2%2BWk0qnwc7DCwYH434hMcOM%3D&rev=2734a9cf94debc6baef4e7d4d9fa28cc28f5b31d' (2024-10-23)
• Updated input 'lix/nix2container':
    'github:nlewo/nix2container/3853e5caf9ad24103b13aa6e0e8bcebb47649fe4' (2024-07-10)
  → 'github:nlewo/nix2container/fa6bb0a1159f55d071ba99331355955ae30b3401' (2024-08-30)
• Updated input 'lix/pre-commit-hooks':
    'github:cachix/git-hooks.nix/f451c19376071a90d8c58ab1a953c6e9840527fd' (2024-07-15)
  → 'github:cachix/git-hooks.nix/4e743a6920eab45e8ba0fbe49dc459f1423a4b74' (2024-09-19)
• Updated input 'nix-github-actions':
    'github:nix-community/nix-github-actions/622f829f5fe69310a866c8a6cd07e747c44ef820' (2024-07-04)
  → 'github:nix-community/nix-github-actions/e04df33f62cdcf93d73e9a04142464753a16db67' (2024-10-24)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/fb81cec9eda2a6b5365ad723995f0329d9e356fd' (2024-08-13)
  → 'github:NixOS/nixpkgs/45e5197248e59e92e88956c5aa12553a7f62337f' (2024-10-25)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/349de7bc435bdff37785c2466f054ed1766173be' (2024-08-12)
  → 'github:numtide/treefmt-nix/aac86347fb5063960eccb19493e0cadcdb4205ca' (2024-10-22)
2024-10-25 12:48:08 -06:00
Yureka 42a160bce2 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/9227223f6d922fee3c7b190b2cc238a99527bbb7' (2024-07-03)
  → 'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01)
• Updated input 'lix':
    'ef0de7c79f.tar.gz?narHash=sha256-GUH5%2BB1JztzDNSN1D7KbndrYSq0LWvVIJnuWKHlpN3Q%3D' (2024-07-16)
  → 'b016eb0895.tar.gz?narHash=sha256-kOpGI9WPmte1L4QWHviuXsr8jxmGn27zwi82jtzYObM%3D&rev=b016eb0895bb6714a4f6530d9a2bb6577ac6c3cf' (2024-08-13)
• Updated input 'lix/nix2container':
    'github:nlewo/nix2container/20aad300c925639d5d6cbe30013c8357ce9f2a2e' (2024-04-13)
  → 'github:nlewo/nix2container/3853e5caf9ad24103b13aa6e0e8bcebb47649fe4' (2024-07-10)
• Updated input 'lix/pre-commit-hooks':
    'github:cachix/git-hooks.nix/e35aed5fda3cc79f88ed7f1795021e559582093a' (2024-04-02)
  → 'github:cachix/git-hooks.nix/f451c19376071a90d8c58ab1a953c6e9840527fd' (2024-07-15)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/732b4f3a3afdfe6a6c4fcb2511e529588d4e5ccd' (2024-07-15)
  → 'github:NixOS/nixpkgs/fb81cec9eda2a6b5365ad723995f0329d9e356fd' (2024-08-13)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/0fb28f237f83295b4dd05e342f333b447c097398' (2024-07-15)
  → 'github:numtide/treefmt-nix/349de7bc435bdff37785c2466f054ed1766173be' (2024-08-12)
2024-08-13 22:00:51 +02:00
Pierre Bourdon c057494450
flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
  → 'github:hercules-ci/flake-parts/9227223f6d922fee3c7b190b2cc238a99527bbb7' (2024-07-03)
• Updated input 'lix':
    'f170870ae7.tar.gz?narHash=sha256-GK6PusfbMgkg%2BqdgChmrw78KTNQkm7SDoJ6%2BlJKY6vg%3D' (2024-06-25)
  → 'ef0de7c79f.tar.gz?narHash=sha256-GUH5%2BB1JztzDNSN1D7KbndrYSq0LWvVIJnuWKHlpN3Q%3D' (2024-07-16)
• Updated input 'nix-github-actions':
    'github:nix-community/nix-github-actions/5163432afc817cf8bd1f031418d1869e4c9d5547' (2023-12-29)
  → 'github:nix-community/nix-github-actions/622f829f5fe69310a866c8a6cd07e747c44ef820' (2024-07-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d9e18354acbf59c625505b7315c85508e9831bf4' (2024-06-18)
  → 'github:NixOS/nixpkgs/732b4f3a3afdfe6a6c4fcb2511e529588d4e5ccd' (2024-07-15)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1cb529bffa880746a1d0ec4e0f5076876af931f1' (2024-06-11)
  → 'github:numtide/treefmt-nix/0fb28f237f83295b4dd05e342f333b447c097398' (2024-07-15)
2024-07-17 07:57:52 +02:00
Pierre Bourdon d9a46559a4
drv: backport CA derivations support changes from hydra-eval-jobs
It is not possible to query output paths for CA derivations since
they're not static / known at eval time. Instead, return JSON nulls for
outputs paths.

This is a partial port of the following Hydra commits:

- 9ba4417940ffdd0fadea43f68c61ef948a4b8d39
- 069b7775c565f5999fe33e8c3f28c7b9306039ca
- fcde5908d8e51f975b883329b34d24a9f30ea4b3

By the following authors:

Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
Co-Authored-By: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
Co-Authored-By: Alexander Sosedkin <monk@unboiled.info>
Co-Authored-By: Andrea Ciceri <andrea.ciceri@autistici.org>
Co-Authored-By: Charlotte 🦝 Delenk Mlotte@chir.rs>
Co-Authored-By: Sandro Jäckel <sandro.jaeckel@gmail.com>
2024-07-16 09:15:21 +02:00
eldritch horrors f8869bdcca update for lix 2.91-dev
the api of nix::Pid changed, causing a build failure.
2024-06-25 23:57:51 +02:00
jade fd86a1a068 Fix on latest lix
Fixes: lix-project/nix-eval-jobs#9
2024-06-18 23:08:04 -07:00
jade 9c23772cf2 Tidy and make it work on release-2.90 2024-06-18 22:31:42 -07:00
puck 11d467fecd Use our own Thread struct instead of std::thread
We'd highly prefer using std::thread here; but this won't let us configure the stack
size. macOS uses 512KiB size stacks for non-main threads, and musl defaults to 128k.
While Nix configures a 64MiB size for the main thread, this doesn't propagate to the
threads we launch here. It turns out, running the evaluator under an anemic stack of
0.5MiB has it overflow way too quickly. Hence, we have our own custom Thread struct.
2024-06-12 22:39:53 +00:00
puck 040db2fe26 flake.nix: nixpkgs-unstable -> nixos-23.11-unstable; flake update
This makes nix-eval-jobs build again.
2024-06-12 22:39:29 +00:00
jade ee79f8a236 Merge pull request 'Fixup readme and version to say what this is' (#6) from jade/fixup-readme-and-version into main
Reviewed-on: lix-project/nix-eval-jobs#6
2024-06-12 21:06:56 +00:00
jade ed7a959ae1 update lix pin to actually work 2024-05-30 12:50:13 -07:00
jade d05f8e86a9 Merge pull request 'lix: deal with util.hh removal' (#7) from jade/util-hh-removal into main
Reviewed-on: lix-project/nix-eval-jobs#7
2024-05-30 02:33:13 +00:00
jade b67c46d320 lix: deal with util.hh removal 2024-05-29 19:17:54 -07:00
jade 30cf61fd26 fix: don't crash on startup on macOS
This is caused, through several layers of absurdity, by runtime type
information of Nix things being invisible due to -fvisibility=hidden
inside n-e-j.

We don't have any idea why n-e-j has -fvisibility=hidden, since blame
says it's from the initial commit. It is plausible that it was some
ill-advised optimization but it's not sound.

The crash is caused by dynamic_cast<RootArgs *>(MyArgs *) failing, which
is in turn caused by the RTTI being invisible.

See: https://www.qt.io/blog/quality-assurance/one-way-dynamic_cast-across-library-boundaries-can-fail-and-how-to-fix-it
Fixes: lix-project/nix-eval-jobs#2
2024-05-27 18:23:13 -06:00
jade 7e22a3daab Fixup readme and version to say what this is 2024-05-27 12:54:51 -06:00
jade 13524829d1 Merge pull request 'nixexpr -> lixexpr' (#5) from jade/lixexpr into main
Reviewed-on: lix-project/nix-eval-jobs#5
2024-05-23 23:24:26 +00:00
jade a94f80e512 nixexpr -> lixexpr 2024-05-23 16:23:45 -07:00
raito 02bcbe0c0e Merge pull request 'fix crash in worker when opening the store' (#4) from open-store-crash into main
Reviewed-on: lix-project/nix-eval-jobs#4
2024-05-11 15:49:35 +00:00
Jörg Thalheim 52e96bd421 fix crash in worker when opening the store 2024-05-11 17:41:27 +02:00
Linus Heckemann 2dbcbe4179 flake: actually use lix 2024-05-09 13:12:12 +02:00
eldritch horrors 793841a9b7 fix drv.cc invalid output throw
EvalState::error does not return an exception instance in lix, but an
exception *builder*. throwing this thing will not trigger any catches,
which then causes the worker process to die without reporting an error
to the collector. this confuses the collector and causes *it* to exit,
effectively breaking nix-eval-jobs for anything that has broken attrs.
2024-04-18 18:05:33 +02:00
Linus Heckemann c3d8ca19b3 EvalError needs to reference an eval state now 2024-04-15 19:35:05 +02:00
Linus Heckemann c1ee00bf7c ProcessOptions: remove allowVfork field
This was removed in Lix 1f8b85786eed623319e5c71a5341b15e3006f870
2024-04-15 19:30:56 +02:00
Linus Heckemann 14e4308346 parseCmdline: no allowShebang arg
This arg was only introduced in Nix 2.19 (commit ffd414eb756dcb3c64348551d5dbaf674c0d4900)
2024-04-15 19:30:32 +02:00
Linus Heckemann a2bd945259 hasPrefix -> starts_with
hasPrefix was removed in lix commit 61e21b25576f7f3491f6a837bf59d8b44c6897a0
2024-04-15 19:28:36 +02:00
Linus Heckemann 733f3051b1 Fix include paths for Nix headers
While the previous style seems more sensible to me (the header names
are quite generic), the pkg-config definitions both from upstream Nix
and from Lix specify -I${includedir}/nix in CFLAGS rather than
-I${includedir}. This may be worth changing, but for now I want
nix-eval-jobs to work and this does what I want.
2024-04-15 19:20:21 +02:00
Jörg Thalheim 6b03a93296
Merge pull request #292 from nix-community/renovate/lock-file-maintenance
Lock file maintenance
2024-01-14 15:34:46 +01:00
renovate[bot] 69371f7bae Update cachix/install-nix-action action to v25 2024-01-12 17:34:52 +00:00
renovate[bot] 64104a3c55 Lock file maintenance 2023-12-25 01:06:16 +00:00
renovate[bot] 1a9b928a5f
Lock file maintenance 2023-12-25 01:02:06 +00:00
Jörg Thalheim 3c6e1234af flake.nix: return to nixpkgs-unstable 2023-12-17 12:15:15 +00:00
Jörg Thalheim 8ef37192bd README: add check-cache-status and nixpkgs evaluation examples 2023-12-17 12:15:15 +00:00
Jörg Thalheim 280de12085 README: update json and help output 2023-12-17 12:15:15 +00:00
Jörg Thalheim e3d71921c3 buffered-io: also check for interrupts in readline
This allows us to more reliable interrupt nix-eval-jobs
2023-12-17 12:15:15 +00:00
Jörg Thalheim 4a1123c42d
Merge pull request #289 from nix-community/joerg-ci
fix exit status reporting when evaluation fails
2023-12-16 17:15:45 +01:00
Jörg Thalheim b73f7ceff4 classify SIGSEV/SIGBUS as infinite recursion errors 2023-12-16 11:58:01 +01:00
Jörg Thalheim 093b8ce5cc apply treefmt 2023-12-16 11:44:08 +01:00
Jörg Thalheim b4f7eb3c77 fix ci for infinite recursion case 2023-12-16 11:40:34 +01:00
Jörg Thalheim 4d97e5a386 improve infinite recursion errors 2023-12-16 10:52:23 +01:00
Jörg Thalheim 83df9d4e24 fix exit status reporting when evaluation fails 2023-12-16 09:48:37 +01:00
Jörg Thalheim 89927c434c make sure we also define HAVE_STRUCT_DIRENT_D_TYPE outside of autotools 2023-12-16 09:24:42 +01:00
Jörg Thalheim 8daea338f3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0838486e9183ce39398f01b221766e68b50f405c' (2023-12-10)
  → 'github:NixOS/nixpkgs/203ecda835bcf69633df7183459283543dd4a874' (2023-12-15)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/afdd5e48a0869b389027307652a658051c0d2f96' (2023-12-10)
  → 'github:numtide/treefmt-nix/d06b70e5163a903f19009c3f97770014787a080f' (2023-12-13)
2023-12-16 09:20:53 +01:00
Jörg Thalheim 4b6d34214d add include-what-you-use to devshell 2023-12-16 09:20:53 +01:00
Jörg Thalheim 1f4bbded61 optimize imports with "include-what-you-use" 2023-12-16 09:20:53 +01:00
renovate[bot] 843dc25cfe chore(deps): lock file maintenance 2023-12-11 00:21:12 +00:00
Jörg Thalheim 521380076d release proc.pid properly before calling waitpid() 2023-12-10 20:36:24 +00:00