1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00
Commit graph

65 commits

Author SHA1 Message Date
John Ericson 6f3045c2a2 Remove unit tests from old build system
Now that we can run all tests with Meson, we want developers making code
changes to use it.

(Only the manual needs to be built with the build system, and that will
change shortly.)

This reverts commit b0bc2a97bf.
2024-08-14 16:38:00 -04:00
John Ericson 93f58150c9 Coarse versions for constituent packages
As discussed in our meeting, we should use a simplified version for the
libraries without the date or commit hash. This will make rebuilding a
lot faster in many cases.

Progress on #10379

Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2024-08-14 12:23:01 -04:00
Robert Hensing 17b5d40445 package.nix: Empty build inputs if not doBuild 2024-07-27 02:39:55 +02:00
Robert Hensing 22f943bb1f dependencies: Centralize aws-sdk-cpp and sync with Nixpkgs
By syncing with Nixpkgs, we reuse the same derivation, which is
generally a good idea, and has the benefit that it is transitively
a channel blocker.

Changes:

- https://github.com/NixOS/nixpkgs/pull/163313 (SuperSandro2000)

  > nix: disable big-parallel for aws-sdk-cpp

  > aws-sdk-cpp only takes ~1m52s on a 4 core machine under 50% load
  > which does not justify the requirement on big parallel.

  > Tested with `nix-build -A nixVersions.nix_2_6.aws-sdk-cpp`.

  > I can finally build nix without requiring a big-parallel machine.

- https://github.com/NixOS/nixpkgs/pull/227506 (Artturin)

  > nix: use [ ] instead null to empty requiredSystemFeatures

  > fixes 'error: value is null while a list was expected' with 'nixpkgs.hostPlatform.gcc.arch = "x86_64";'
2024-07-27 02:16:05 +02:00
John Ericson b0bc2a97bf Put unit tests back in old build system for now 2024-07-02 09:26:22 -04:00
John Ericson f7ce10dbc1 Fix static build 2024-07-02 09:26:22 -04:00
John Ericson 17c843c5c5 Fix more issues 2024-07-02 09:26:22 -04:00
John Ericson 0b539dea4a Improve boost hacks 2024-07-02 09:26:22 -04:00
John Ericson 17a8c2bfce Unit tests and external libraries 2024-07-02 09:23:24 -04:00
John Ericson b87e048b3b Override toml11 so it evaluates on Windows too 2024-06-26 23:30:38 -04:00
Winter 149d8eb8aa Stop vendoring toml11
We don't apply any patches to it, and vendoring it locks users into
bugs (it hasn't been updated since its introduction in late 2021).

Closes https://git.lix.systems/lix-project/lix/issues/164

Change-Id: Ied071c841fc30b0dfb575151afd1e7f66970fdb9
(cherry picked from commit 80405d06264f0de1c16ee2646388ab501df20628)
2024-06-26 22:27:13 -04:00
Robert Hensing 85de5a60c7 Use lib instead of explicit fileset passing 2024-06-26 04:11:20 +02:00
Valentin Gagarin 1c131ec2b7
Port C API docs to Meson (#10936)
* Port C API docs to Meson

* don't cross-compile the docs
2024-06-19 22:43:54 +02:00
Valentin Gagarin 6e34c68327 Convert the internal API doc build to Meson 2024-06-17 15:51:58 -04:00
John Ericson a83d95e26e Integrate perl with the other meson builds
One big dev shell!
2024-06-17 14:48:20 -04:00
Robert Hensing 2894c1b38e WIP add testresults output 2024-06-16 16:34:54 +02:00
John Ericson 28d2af4ea6 Build nix-util with Meson
The idea is two-fold:

- Replace autotools with Meson

- Build each library in its own derivation

The interaction of these two features is that Meson's "subprojects"
feature (https://mesonbuild.com/Subprojects) allows us to have single
dev shell for building all libraries still, while also building things
separately. This allows us to break up the build without a huge
productivity lost.

I tested the Linux native build, and NetBSD and Windows cross builds.

Also do some clean ups of the Flake in the process of supporting new
jobs.

Special thanks to everyone that has worked on a Meson port so far,
@p01arst0rm and @Qyriad in particular.

Co-Authored-By: p01arst0rm <polar@ever3st.com>
Co-Authored-By: Artemis Tosini <lix@artem.ist>
Co-Authored-By: Artemis Tosini <me@artem.ist>
Co-Authored-By: Felix Uhl <felix.uhl@outlook.com>
Co-Authored-By: Jade Lovelace <lix@jade.fyi>
Co-Authored-By: Lunaphied <lunaphied@lunaphied.me>
Co-Authored-By: Maximilian Bosch <maximilian@mbosch.me>
Co-Authored-By: Pierre Bourdon <delroth@gmail.com>
Co-Authored-By: Qyriad <qyriad@qyriad.me>
Co-Authored-By: Rebecca Turner <rbt@sent.as>
Co-Authored-By: Winter <winter@winter.cafe>
Co-Authored-By: eldritch horrors <pennae@lix.systems>
Co-Authored-By: jade <lix@jade.fyi>
Co-Authored-By: julia <midnight@trainwit.ch>
Co-Authored-By: rebecca “wiggles” turner <rbt@sent.as>
Co-Authored-By: wiggles dog <rbt@sent.as>
Co-Authored-By: fricklerhandwerk <valentin@fricklerhandwerk.de>
Co-authored-By: Eli Schwartz <eschwartz93@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-12 18:31:02 -04:00
John Ericson 1a2f88491f Move libseccomp source override outside package.nix
This makes it match the current pattern:

- `package.nix` assumes deps are right version

- Overlay in `flake.nix` creates `*-nix` package variations

- Overlay manually passes in those packages to `package.nix`
2024-04-25 16:38:35 -04:00
Maximilian Bosch 73918b0ae4
Require at least libseccomp 2.5.5
Closes #10585

As it turns out, libseccomp maintains an internal syscall table and
validates each rule against it. This means that when using libseccomp
2.5.4 or older, one may pass `452` as syscall number against it, but
since it doesn't exist in the internal structure, `libseccomp` will refuse
to create a filter for that. This happens with nixpkgs-23.11, i.e. on
stable NixOS and when building Nix against the project's flake.

To work around that

* a backport of libseccomp 2.5.5 on upstream nixpkgs has been
  scheduled[1].

* the package now uses libseccomp 2.5.5 on its own already. This is to
  provide a quick fix since the correct fix for 23.11 is still a staging cycle
  away.

It must not be possible to build a Nix with an incompatible libseccomp
version (nothing can be built in a sandbox on Linux!), so configure.ac
rejects libseccomp if `__SNR_fchmodat2` is not defined.

We still need the compat header though since `SCMP_SYS(fchmodat2)`
internally transforms this into `__SNR_fchmodat2` which points to
`__NR_fchmodat2` from glibc 2.39, so it wouldn't build on glibc 2.38.
The updated syscall table from libseccomp 2.5.5 is NOT used for that
step, but used later, so we need both, our compat header and their
syscall table 🤷

[1] https://github.com/NixOS/nixpkgs/pull/306070
2024-04-22 22:37:34 +02:00
Robert Hensing 5b36ee4c95 Add pre-commit hook and make format target
I've added the new local.mk to the package sources. While this
should not be needed for the build, it is the simplest solution,
and won't cause many extra rebuilds, because the file won't change
very often.
2024-04-21 13:54:34 +02:00
Robert Hensing 45a1142a8e devShell: enable API docs
Affects both the deps and the configure flags in configurePhase.
2024-04-17 13:12:46 +02:00
José Luis Lafuente 24604d024a
C API: fix docs build after rebase 2024-03-28 10:51:59 +01:00
José Luis Lafuente 55601963b3
C API: fix documentation build 2024-03-28 10:50:08 +01:00
John Ericson 4a61827d2d Hack to make sure the DLL linking job works with the check output 2024-03-27 12:01:59 -04:00
John Ericson ae2b2849c9 Disable GC on windows
We can build the dep and the our GC code is totally portable, but for
some reason we get link errors saying `GC_throw_bad_alloc` is missing.
2024-03-27 12:01:59 -04:00
Théophane Hufschmitt 74008d8215 Run preInstallCheck even when not building
Add `runHook preInstallCheck` to the overriden `installCheckPhase` used
for the non-build case.

In particular, this allow the fix from 2a34510776
to also apply there.
2024-03-11 15:34:23 +01:00
Robert Hensing 2a34510776 package.nix: Apply OBJC_DISABLE_INITIALIZE_FORK_SAFETY workaround
This was previously already used in the launchd configuration for
nix-daemon.

(cherry picked from commit 855741aea5)
2024-03-06 22:07:05 +01:00
Valentin Gagarin 4b15ca2ffb add tests for showing help 2024-03-04 16:14:00 +01:00
Théophane Hufschmitt 44f10f000a flake: Update to NixOS 23.11
About time :)

This required disabling `bear` on darwin as it's currently broken (fixed
on master, but not yet on 23.11).
2024-02-28 07:08:21 +01:00
John Ericson 04836c73e5 Merge nativeCheckInputs into nativeBuildInputs
They were getting skipped for the test-against checks.
2024-02-27 11:27:34 -05:00
Eelco Dolstra 0070400809 maintainers/release-notes: Include changelog-d
Otherwise it quietly generates an empty rl-<version>.md
2024-01-29 17:13:48 +01:00
John Ericson 1de8eed28a Move dependency patches from top level into subdir
Good to not clutter the top-level directory.
2024-01-17 13:13:54 -05:00
John Ericson 9b9ecdee34 Simplify RapidCheck configure
No more `RAPIDCHECK_HEADERS`!
2024-01-15 08:05:05 -05:00
John Ericson dd7e7b0a30 Newer Nixpkgs, get readline on Windows
Now `nix repl` an, in principle, work on that platform too.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2c9c58e98243930f8cb70387934daa4bc8b00373' (2023-12-31)
  → 'github:NixOS/nixpkgs/86501af7f1d51915e6c335f90f2cab73d7704ef3' (2024-01-11)
2024-01-12 19:19:21 -05:00
John Ericson a923444a94 packages.nix: Fix installUnitTests condition
The intent was we install the tests when we can *not* run them. Instead,
we were installing them when we can.
2024-01-11 16:39:56 -05:00
John Ericson 0c3ce23754 Improve the build without GC
We don't just want to pass `--enable-gc=no`; we also want to make sure
boehmgc is not a dependency. Creating a nix-level configuration option
to do both, and then using that for the CI job, is more robust.
2024-01-09 17:48:50 -05:00
John Ericson 2cea88dbc8 Improve build sytem support for readline instead of editline
Changes:

- CPP variable is now `USE_READLINE` not `READLINE`

- `configure.ac` supports with new CLI flag

- `package.nix` supports with new configuration option

- `flake.nix` CIs this (along with no markdown)

Remove old Ubuntu 16.04 stop-gap too, as that is now quite old.

Motivation:

- editline does not build for Windows, but readline *should*. (I am
  still working on this in Nixpkgs at this time, however. So there will
  be a follow-up Nix PR removing the windows-only skipping of the
  readline library once I am done.)

- Per
  https://salsa.debian.org/debian/nix/-/blob/master/debian/rules?ref_type=heads#L27
  and #2551, Debian builds Nix with readline. Now we better support and
  CI that build configuration.

This is picking up where #2551 left off, ensuring we test a few more
things not merely have CPP for them.

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
2024-01-09 16:56:55 -05:00
John Ericson 15820a0507
Merge pull request #9720 from NixOS/fix-internal-api-docs
Fix Internal API docs
2024-01-08 16:33:38 -05:00
John Ericson 29eb5ed1dc Fix Internal API docs
Because of source filtering, they were empty.

Fixes #9694
2024-01-08 14:47:42 -05:00
Weijia Wang bbd0a959e1 Make lowdown optional
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-01-08 20:37:42 +01:00
Eelco Dolstra 388c79d546 Don't pull in libboost_regex
We're not using and we don't want to pull in libicu (37 MiB).
2024-01-05 15:17:01 +01:00
John Ericson 86e9244437 Fix buildNoTest
`checkInputs` is not right for this because we don't just need these
deps when `doTest`, we also need them when `installUnitTests`.
2024-01-02 12:41:53 -05:00
Cole Helbling ba0087316a package: don't set sysconfdir in devShells 2023-12-18 12:59:58 -08:00
John Ericson 7feabf7d44 Split --disable-tests, fix cross builds
It might seem obnoxious to have yet more configure flags, but I found
controlling both the unit and functional tests with one flag was quite
confusing because they are so different:

- unit tests depending on building, functional tests don't (e.g. when
  we test already-built Nix)

- unit tests can be installed, functional tests cannot

- unit tests neeed extra libraries (GTest, RapidCheck), functional
  tests need extra executables (jq).

- unit tests are run by `make check`, functional tests are run by `make
  installcheck`

Really on a technical level, they seem wholly independent. Only on a
human level ("they are both are tests") do they have anything in common.

I had messed up the logic in cross builds because of this. Now I
split the flag in two (and cleaned up a few other inconsistencies), and
the logic fixed itself.

Co-Authored-By: Robert Hensing <roberth@users.noreply.github.com>
2023-12-18 10:47:50 -05:00
Rebecca Turner 6ed803737c
Use --with-boost on macOS
`configureFlags` only included `--with-boost` on Linux, which makes
local builds as outlined in `doc/manual/src/contributing/hacking.md`
fail when performed on macOS.
2023-12-13 14:02:52 -08:00
John Ericson 2d24875fe4 package.nix: Avoid ${..} for conditional strings
Using `+` is Nixpkgs standard ideom for this, and helps avoid needless
rebuilds somewhat.
2023-12-13 20:49:31 +00:00
John Ericson 28f2f3136d Delete stray install_name_tool call 2023-12-13 20:47:36 +00:00
John Ericson bf5804d46a flake.nix: Delete uneeded attrs0 binding 2023-12-13 20:41:41 +00:00
John Ericson ff992f8b46 Merge remote-tracking branch 'upstream/master' into package-nix 2023-12-11 15:26:12 -05:00
John Ericson 14c26d642e Clean up two comments 2023-12-03 18:57:16 -05:00