1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
Commit graph

183 commits

Author SHA1 Message Date
Sergei Zimmerman
a653184926
Drop precompiled-headers.h
Since the migration to meson precompiled-headers.h isn't actually used
anymore and is just confusing. Meson can't handle shared pch across
subprojects [1] and without that there's no performances benefit of PCH
at all. Also rolling our own support for that isn't trivial. See [2] for
an example of how that would look like.

[1]: https://github.com/mesonbuild/meson/issues/4350
[2]: 22bc8b6473/plugins/meson.build
2025-05-28 21:42:33 +00:00
John Ericson
625dce659a Prepare for FreeBSD sandboxing support
This is the utility changes from #9968, which were easier to rebase
first.

I (@Ericson2314) didn't write this code; I just rebased it.

Co-Authored-By: Artemis Tosini <me@artem.ist>
Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
2025-05-27 14:54:50 -04:00
John Ericson
d1295448e0 Copy files before split
Same technique as 6c2a7fdc49.
2025-05-20 11:54:52 -04:00
John Ericson
45726dcc55
Merge pull request #13189 from NixOS/rl-next
Add release notes
2025-05-14 19:58:59 -04:00
John Ericson
646f3064a3 Cache more contributors 2025-05-14 18:44:39 -04:00
Sergei Zimmerman
90d70aa4c9
libutil: Format lru-cache.hh
Rip off the band-aid for further refactors. The diff is
very small, so it makes to get it out of the way first.
2025-05-14 21:23:13 +00:00
Jeremy Fleischman
5ea7b97147
refactor: create a new nix formatter run command alias for nix fmt
This refactor shouldn't change much except add a new `nix formatter run`
command. This creates space for the new `nix formatter build` command,
which I'll be introducing in the next commit.
2025-04-29 18:40:02 -07:00
Eelco Dolstra
bc67e47298 Move libflake/flake/* to libflake 2025-04-23 17:20:42 +02:00
John Ericson
4e586149df Get rid of LocalDerivationGoal
I split it out before to try to separate the building logic, but now we
have the much better `DerivationBuilder` abstraction for that. With that
change, I think `LocalDerivationGoal` has outlived its usefulness.

We just inline it back into `DerivationGoal`, and do so with minimal
`#ifdef` for Windows.

Note that the order of statements in `~DerivationGoal` is different than
it was after the `~LocalDerivationGoal` split, but it is *restored* to
the way it original was before --- evidently I did the split slightly
wrong, but nobody noticed, probably because the order doesn't actually
matter.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2025-04-20 18:09:41 -04:00
John Ericson
9792d6bbd9 Move DerivationBuilder to its own file/header
The building logic is now free of the scheduling logic!

(The interface between them is just what is in the new header. This
makes it much easier to audit, and shrink over time.)
2025-04-16 18:59:17 -04:00
Robert Hensing
da36c34db7 maintainers/release-notes: Let it fail
Fail when a command fails.

Basic error handling was missing, which would lead to errors getting
obscured a bit by subsequent successful logging.
2025-04-07 01:46:43 +02:00
Robert Hensing
4ac9bc08ea Fix maintainers/release-credits output
(cherry picked from commit b87b3d79f2)
2025-04-06 17:03:36 -04:00
Robert Hensing
f261c03686 chore: Update contributor handle caches
(cherry picked from commit 6687ce2a6d)
2025-04-06 17:03:35 -04:00
John Ericson
cc24766fa6 Expose the nix component in header include paths
For example, instead of doing

    #include "nix/store-config.hh"
    #include "nix/derived-path.hh"

Now do

    #include "nix/store/config.hh"
    #include "nix/store/derived-path.hh"

This was originally planned in the issue, and also recent requested by
Eelco.

Most of the change is purely mechanical. There is just one small
additional issue. See how, in the example above, we took this
opportunity to also turn `<comp>-config.hh` into `<comp>/config.hh`.
Well, there was already a `nix/util/config.{cc,hh}`. Even though there
is not a public configuration header for libutil (which also would be
called `nix/util/config.{cc,hh}`) that's still confusing, To avoid any
such confusion, we renamed that to `nix/util/configuration.{cc,hh}`.

Finally, note that the libflake headers already did this, so we didn't
need to do anything to them. We wouldn't want to mistakenly get
`nix/flake/flake/flake.hh`!

Progress on #7876
2025-04-01 11:40:42 -04:00
Jörg Thalheim
c69e11ac46 Revert "Create script to symlink headers to old location"
This reverts commit c6a176be62.

Polluting the source tree with untracked symlinks that can end up
dangling may be unsound.
2025-04-01 13:55:41 +02:00
John Ericson
c6a176be62 Create script to symlink headers to old location
See comments on the script; this is supposed to avoid breaking muscle
memory without complicating the build system (which proved harder than I
thought too) or not doing the header hygiene change at all.

link-headers: use pathlib consistenly and fix type errors
2025-03-31 21:32:27 +02:00
John Ericson
f3e1c47f47 Separate headers from source files
The short answer for why we need to do this is so we can consistently do
`#include "nix/..."`. Without this change, there are ways to still make
that work, but they are hacky, and they have downsides such as making it
harder to make sure headers from the wrong Nix library (e..g.
`libnixexpr` headers in `libnixutil`) aren't being used.

The C API alraedy used `nix_api_*`, so its headers are *not* put in
subdirectories accordingly.

Progress on #7876

We resisted doing this for a while because it would be annoying to not
have the header source file pairs close by / easy to change file
path/name from one to the other. But I am ameliorating that with
symlinks in the next commit.
2025-03-31 12:20:25 -04:00
John Ericson
041394b741 monitor-fd.hh: Format
It's a pretty small diff, so let's just start formatting before we make
other changes.
2025-03-23 18:00:36 -04:00
Sergei Zimmerman
a53b184e63 {libutil,libexpr}: Move pos-idx,pos-table code to libutil
All of this code doesn't actually depend on anything from
libexpr. Because Pos is so tigtly coupled with Error, it
makes sense to have in the same library.
2025-03-13 13:29:08 +00:00
John Ericson
92c4789ec7
Merge pull request #12573 from tomberek/tomberek.update_meeting
fix: update work meeting calendar link
2025-02-27 16:37:45 -05:00
Eelco Dolstra
c5a64aefac Add contributors 2025-02-26 22:01:24 +01:00
Thomas Bereknyei
068cdfafb8 fix: update work meeting calendar link 2025-02-26 15:45:57 -05:00
Robert Hensing
573ffac2e6 Remove nixfmt override
Closes https://github.com/NixOS/nix/issues/12418
IFD in nixfmt repo
2025-02-19 10:29:58 +01:00
Robert Hensing
73060b4972 pre-commit/check-merge-conflicts-2: fix use outside dev shell
Note that this is just a script that is meant to run outside a
derivation (but also can be called by a derivation builder).
`touch $out` does not belong in it.

`touch $out` worked accidentally in the derivation-based check,
and also in the dev shell, but if pre-commit is invoked without
the dev shell it would fail.
2025-02-07 10:56:15 +01:00
Robert Hensing
96e550efc5 Format .nix files
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00
Robert Hensing
ba6425a7d0 dev: Configure nixfmt (rfc style) 2025-01-24 17:02:50 +01:00
Eelco Dolstra
c5dc749bb3 Add mergify backport rule for 2.26 2025-01-22 14:13:24 +01:00
Eelco Dolstra
f472be29ab Update the release script 2025-01-22 13:28:30 +01:00
Eelco Dolstra
21f2e29176 Add release credits 2025-01-22 12:01:00 +01:00
Robert Hensing
29a1a21ce4 Reject merge conflicts
They're usually found by other checks, but docs would remain
susceptible.
2025-01-12 13:53:21 +01:00
Philipp Otterbein
92e30955b9 try to calculate character width 2024-12-28 12:01:32 +01:00
Jörg Thalheim
35dd19d785 ensure clang-format is using the same version on all platforms 2024-12-09 21:15:58 +01:00
Anatoli Babenia
37fd80588f shellcheck: simplify install-nix-from-tarball.sh 2024-11-27 17:11:36 +03:00
Anatoli Babenia
4145d18435 Rename install-nix-from-closure.sh into install-nix-from-tarball.sh
Because it is only used as /install script from tarball.
2024-11-24 22:29:17 +01:00
Eelco Dolstra
f29e7867a9 Revert "Merge pull request #11826 from DeterminateSystems/revert-11804"
This reverts commit aeffdeffc8, reversing
changes made to 723fdeb4f1.
2024-11-11 15:21:34 +01:00
Valentin Gagarin
17c94b7ff7
Merge pull request #11842 from DeterminateSystems/release-notes
Nix 2.25 release notes
2024-11-11 12:24:05 +01:00
Robert Hensing
6f50e6a3fa
maintainers/onboarding: Subscribe to discourse category (#11848)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-11-10 22:20:06 +00:00
Eelco Dolstra
397f3c544e Add credits 2024-11-08 17:10:20 +01:00
Eelco Dolstra
67d231c046 Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
This reverts commit 619eeb658a, reversing
changes made to 1af94bf471.
2024-11-07 13:46:37 +01:00
John Ericson
e70c9bb06a Remove old build system 2024-11-06 16:09:18 -05:00
Bryan Honof
c800f3fa93
chore: run formatters 2024-11-04 14:41:40 +01:00
Bryan Honof
affd2dbc6c
test(functional): add tests for new environment operation flags 2024-11-04 14:41:33 +01:00
Valentin Gagarin
9bb153acb2 maintainers: add checklist for security releases
Co-Authored-By: Robert Hensing <robert@roberthensing.nl
Co-authored-by: Dan Baker <daniel.n.baker@gmail.com>
2024-10-31 18:34:19 +01:00
Tim Van Baak
a75b082a28 Expand shellcheck coverage in functional tests
Ref NixOS/nix#10795
2024-10-30 08:27:06 -07:00
John Ericson
e65510da56 Move unit tests to the location Meson expects them to be
Everything that is a separate subproject should live in the subprojects
directory.

Progress on #2503

This reverts commit 451f8a8c19.
2024-10-17 15:42:16 -04:00
Eelco Dolstra
1cd48008f0
Merge pull request #11710 from NixOS/doc-onboarding
maintainers/onboarding: Start documenting
2024-10-17 11:06:23 +02:00
Robert Hensing
c196011d23 maintainers/onboarding: Start documenting 2024-10-16 22:06:28 +02:00
Eelco Dolstra
7bd0c70b37 maintainers/README.md: Remove the list of team members
Let's have one canonical location for the team membership.
2024-10-16 22:03:44 +02:00
John Ericson
eb7d7780b1 Rename doc/manual{src -> source}
This is needed to avoid this
https://github.com/mesonbuild/meson/issues/13774 when we go back to
making our subproject directory `src`.
2024-10-14 11:21:24 -04:00
Eelco Dolstra
ee3f0b7a8b Rename import-derivation -> import-from-derivation 2024-09-17 16:56:40 +02:00