Commit graph

15543 commits

Author SHA1 Message Date
Jacek Galowicz 118fa9689a Create internal-api-docs.nix 2023-12-02 16:42:01 +00:00
Jacek Galowicz ca59832808 Fix coverage.nix 2023-12-02 16:36:59 +00:00
Jacek Galowicz 2c3749a335 Fix cross builds 2023-12-02 16:08:06 +00:00
Jacek Galowicz eff9b12bc2 Further changes 2023-12-01 11:25:22 +00:00
Jacek Galowicz f55ee7cf77 little refactoring 2023-11-30 22:53:46 +00:00
Jacek Galowicz c64190e650 Run statix 2023-11-30 22:53:46 +00:00
Jacek Galowicz c982198485 First step 2023-11-30 22:48:44 +00:00
John Ericson 2fe7e009bb
Merge pull request #9502 from fricklerhandwerk/internal-lookup-paths
use lookup paths in helper expressions consistently
2023-11-30 16:23:24 -05:00
Valentin Gagarin d5ffc94f33 use lookup paths in helper expressions consistently
this makes the files in question a bit more independent of source location.

to find where the value is set and how it's wired up:

    rg nix=doc/manual
2023-11-30 21:53:31 +01:00
John Ericson 7cc2aa799e
Merge pull request #9500 from fricklerhandwerk/generated-docs
keep generated documentation in a separate directory
2023-11-30 15:51:01 -05:00
Valentin Gagarin 44d21f6ef9 keep generated documentation in a separate directory
- helps navigating the code as it highlights which files are generated
- makes it less error prone when working incrementally
  (although this should be just fixed by building out of tree)
2023-11-30 20:39:24 +01:00
Théophane Hufschmitt 3d46fa85c8
Merge pull request #9489 from NixOS/doc-url
Avoid `<name>/<name>` in documentation URLs
2023-11-30 19:08:24 +01:00
Eelco Dolstra 3bebaefcd0
Merge pull request #9476 from alois31/restore-progress-bar
nix repl: Only hide the progress bar while waiting for user input
2023-11-30 16:07:28 +01:00
John Ericson f99e468640 Avoid <name>/<name> in documentation URLs
They are redundant and look weird.
2023-11-30 09:37:32 -05:00
Eelco Dolstra cb7f25869d
Merge pull request #9430 from hercules-ci/remove-vlas
Fix stack overflow in `filter`
2023-11-30 15:31:44 +01:00
Eelco Dolstra b6a3fde6b7
Merge pull request #9465 from obsidiansystems/build-dir
Use `buildprefix` in a few more places
2023-11-30 15:28:37 +01:00
Eelco Dolstra eac0a62052
Merge pull request #9491 from obsidiansystems/fix-freebsd
Improve ACL clearing support (fixing FreeBSD build)
2023-11-30 15:27:24 +01:00
John Ericson ca72e3e7e8
Merge pull request #5145 from fedepell/local_doc_build_5140
Docs build: depend on locally built nix executable and not installed one
2023-11-30 01:14:34 -05:00
Federico Pellegrin d536c57e87 Docs build: depend on locally built nix executable and not installed one
Previously many of the documentation targets were depending on
`$(bindir)/nix` which is the installed version. This meant that its
install rules would be triggered (which in chain would also trigger the
install of libraries, as reported in #5140). Therefore a build of the
documentation without an installation would not be possible (which apart
from doing unwanted operations it may also generate permission problems
for example).

The fix makes the rules depend on `$(nix_PATH)` instead, which is the
executable in the build tree.
2023-11-30 00:44:45 -05:00
John Ericson a7115a47ef Improve ACL clearing support (fixing FreeBSD build)
The problem was that f880469173 forgot
that the `#include <sys/xattr.h>` was guarded by an `#ifdef __linux__`.

However, the build failure was only on FreeBSD --- turns out other
platforms have this header too!

The fix therefore uses a new configure check so we properly clear ACLs
on more platforms.
2023-11-29 21:09:19 -05:00
Alex Ameen 02bd821f2e
fix: nlohmann::adl_serializer for std::optional (#9147)
This allows templates such as `NLOHMANN_DEFINE_TYPE_*` templates and other generators with things like `std::vector<std::optional<T>>`.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2023-11-30 01:26:39 +00:00
John Ericson 52e0911302 Use buildprefix in a few more places
`installcheck` doesn't yet work, but the rest of the build can now
happen mostly inside a separate build directory.

Progress on #9342

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-11-29 19:49:07 -05:00
Théophane Hufschmitt a8fea5a54f
Merge pull request #9477 from tweag/nix-config-show
Rename `nix show-config` to `nix config show`
2023-11-28 15:04:15 +01:00
Théophane Hufschmitt f300e11b05 Rename nix show-config to nix config show
Part of #7672
2023-11-28 14:28:19 +01:00
alois31 20cd5eb2b3
nix repl: Only hide the progress bar while waiting for user input
In commit 0d2163c6dc, the progress bar was hidden
in nix repl because of a regression that caused it to interfere with user
input. Several users like(d) seeing the progress bar in the repl during builds.
Only hiding it while waiting for user input gives us the best of both worlds,
so do just that.
2023-11-27 19:25:15 +01:00
Robert Hensing f0180487a0
Merge pull request #9462 from trofi/eval.o-dependency
libexpr: add missing dependency on 'flake/call-flake.nix.gen.hh'
2023-11-27 17:25:21 +01:00
Robert Hensing 928f0c1341
Merge pull request #9393 from hercules-ci/changelog-d
Automatically compile hand-written release notes with `changelog-d`
2023-11-27 16:29:16 +01:00
Robert Hensing 68c48756fe libexpr/local.mk: Make eval compile deps regular
Dependency is now entirely through the eval.cc rule.
All gen.hh deps are now there.
2023-11-27 15:52:24 +01:00
Robert Hensing f7bfec2806
maintainers/release-notes: Improve DATE check
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-11-27 15:18:29 +01:00
tomberek 0c6fe1be7d
Merge pull request #9459 from fricklerhandwerk/page-redirects
add path based redirects
2023-11-27 08:28:27 -05:00
Valentin Gagarin 384ffb4443 add deprecation warnings in documentation
this is hacky, but can serve as a stopgap until we can do it
programmatically.
2023-11-27 14:07:32 +01:00
Théophane Hufschmitt d46230eff5
Merge pull request #7762 from yorickvP/boost-regex
Switch from std::regex to boost::regex
2023-11-27 10:59:22 +01:00
Théophane Hufschmitt e986d20bed
Remove an obsolete comment 2023-11-27 10:25:18 +01:00
Sergei Trofimovich 75134b7513 libexpr: add missing dependency on 'flake/call-flake.nix.gen.hh'
Without the change build for `eval.o` fails occasionally as:

    $ make src/libexpr/eval.o
      GEN    Makefile.config
      GEN    src/libexpr/primops/derivation.nix.gen.hh
      GEN    src/libexpr/fetchurl.nix.gen.hh
      GEN    src/libexpr/parser-tab.cc
      GEN    src/libexpr/lexer-tab.cc
    src/libexpr/lexer.l:314: warning, -s option given but default rule can be matched
      CXX    src/libexpr/eval.o
    src/libexpr/eval.cc:519:18: fatal error: flake/call-flake.nix.gen.hh: No such file or directory
      519 |         #include "flake/call-flake.nix.gen.hh"
          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [mk/patterns.mk:3: src/libexpr/eval.o] Error 1

Noticed in https://github.com/NixOS/nixpkgs/pull/269439
2023-11-27 08:56:24 +00:00
Moritz Angermann f56401a114 nix flake update add deprecation warnings.
This builds on #8817, to add additional UX help for people with existing
muscle memory (or shell history) with --update-input and tries to gently
guide them towards the newly evolved CLI UI.

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2023-11-27 09:08:15 +01:00
Valentin Gagarin 2b7016cc56 add path based redirects
up to now, those were managed outside of this repo, which as
unsurprisingly a real hassle to deal with if one wanted to prevent URLs
from breaking when moving pages around. this change removes a large part
of the friction involved in moving content in the Nix manual.

possible next steps for further automation:
- check for content that moved and warn if it's not reachable from
  links that were valid prior to a change
- create redirect rules automatically based on this information
2023-11-27 08:33:03 +01:00
Robert Hensing e7e21aa0c8 flake.nix: Use top level changelog-d
It is about 2 MB now, as only it and libffi (tiny) are new in the
build or shell closures.
2023-11-26 21:21:55 +01:00
Robert Hensing c5d49ec7ab flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/decdf666c833a325cb4417041a90681499e06a41' (2023-11-18)
  → 'github:NixOS/nixpkgs/9ba29e2346bc542e9909d1021e8fd7d4b3f64db0' (2023-11-23)
2023-11-26 21:21:55 +01:00
Robert Hensing d63f72197c Don't run changelog-d in the build
This way we lose the preview of release notes on master, as well
as on https://nixos.org/manual/nix/unstable/release-notes/rl-next
but we can come back to this.
2023-11-26 21:21:55 +01:00
Jan Tojnar f25c06d7a3 docs: Fix broken link
Link target definitions need to be in a separate paragraph to be collected.

Fixup for 217d863f7a
2023-11-26 19:32:28 +01:00
John Ericson fdac6e3818
Merge pull request #9451 from kolloch/feature/git-ignore-ds-store
gitignore: Also ignore .DS_Store
2023-11-25 11:47:49 -05:00
Peter Kolloch 213594721a gitignore: Also ignore .DS_Store
This is a file that Finder on Mac OS loves to add into various folders.
2023-11-25 17:30:03 +01:00
Yorick d2f5e263e3
Switch from std::regex to boost::regex 2023-11-25 15:14:18 +01:00
John Ericson dda0e34ecf
Merge pull request #9443 from ivan770/reproducibility
doc: fix machine-specific capabilities leaking
2023-11-24 22:59:38 -05:00
ivan770 54b6847655 doc: fix machine-specific capabilities leaking 2023-11-24 11:17:35 -05:00
Robert Hensing 857f9168f7 Migrate rl-next.md to doc/manual/rl-next directory 2023-11-24 16:53:33 +01:00
Robert Hensing 6971c4adc0 maintainers/release-notes <- scripts/release-notes 2023-11-24 16:53:33 +01:00
Robert Hensing 7c4ee5c813 scripts/release-notes: Avoid mutating variables 2023-11-24 16:53:33 +01:00
Robert Hensing b1ea30f21d scripts/release-notes: Support patch releases
This also fixes the broken case statement, which has globs, not regexes.
2023-11-24 16:53:33 +01:00
Robert Hensing 2a538c571b Add scripts/release-notes 2023-11-24 16:53:33 +01:00