aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
AgeCommit message (Collapse)Author
2023-12-01Move tests to separate directories, and documentJohn Ericson
Today, with the tests inside a `tests` intermingled with the corresponding library's source code, we have a few problems: - We have to be careful that wildcards don't end up with tests being built as part of Nix proper, or test headers being installed as part of Nix proper. - Tests in libraries but not executables is not right: - It means each executable runs the previous unit tests again, because it needs the libraries. - It doesn't work right on Windows, which doesn't want you to load a DLL just for the side global variable . It could be made to work with the dlopen equivalent, but that's gross! This reorg solves these problems. There is a remaining problem which is that sibbling headers (like `hash.hh` the test header vs `hash.hh` the main `libnixutil` header) end up shadowing each other. This PR doesn't solve that. That is left as future work for a future PR. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> (cherry picked from commit 91b6833686a6a6d9eac7f3f66393ec89ef1d3b57) (cherry picked from commit a61e42adb528b3d40ce43e07c79368d779a8b624)
2023-12-01Put functional tests in `tests/functional`John Ericson
I think it is bad for these reasons when `tests/` contains a mix of functional and integration tests - Concepts is harder to understand, the documentation makes a good unit vs functional vs integration distinction, but when the integration tests are just two subdirs within `tests/` this is not clear. - Source filtering in the `flake.nix` is more complex. We need to filter out some of the dirs from `tests/`, rather than simply pick the dirs we want and take all of them. This is a good sign the structure of what we are trying to do is not matching the structure of the files. With this change we have a clean: ```shell-session $ git show 'HEAD:tests' tree HEAD:tests functional/ installer/ nixos/ ``` (cherry picked from commit 68c81c737571794f7246db53fb4774e94fcf4b7e)
2023-09-25flake: complete update to 23.05Gerg-L
(cherry picked from commit f264d9ff0862277523a207c7afaed4894a40dc11)
2023-09-20Mark official releaseEelco Dolstra
2023-09-19Disable rapidcheck tests in the coverage runEelco Dolstra
https://hydra.nixos.org/build/233688539
2023-09-19Try aws-sdk-cpp fixEelco Dolstra
2023-09-01flake: update nixpkgs: 22.11 -> 23.05Vladimír Čunát
The lowdown input can't be updated; `nix build` would fail to find it. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-30nixpkgsLibTests: Only test our NixRobert Hensing
Interface has changed upstream. It *should* be fine to test 23.05's other Nix versions as those *should* succeed, but that's not the case and it's obfuscating our terrible CI setup's log.
2023-08-23update system definitionsp01arst0rm
2023-08-16Add gc root for nixpkgs/lib contentRobert Hensing
2023-08-16GC root for fetched nixpkgs/lib contentRobert Hensing
2023-08-16Add positive source filterRobert Hensing
Source filtering is a really cool Nix feature that lets us avoid a lot of rebuilds, which speeds up the iteration cycle a lot in cases where the relevant source files aren't actually modified. We used to have a source filter that marked a few files as irrelevant, but this is the wrong approach, as we have many more files that are irrelevant. We may call this negative filtering. This commit switches the source filtering to positive filtering, which is a lot more robust. Instead of marking which files we don't need we marked the files that we do need. It's a superior approach because it is fail safe. Instead of allowing build performance problems to creep in over time, we require that all source inputs are declared. I shouldn't have to explain that declaring inputs is a good practice, so I'll stop over-explaining here. I do have to acknowledge that this will cause a build failure when the filter is incomplete. This is *good*, because it's the only realistic way we could be reminded of these problems. These events will be infrequent, so the small cost of extending the filter is worth it, compared to the hidden cost of longer dev cycles for things like tests, docker image, etc, etc. (Also rebuilding Nix for stupid unnecessary reasons makes my blood boil)
2023-06-13Allow tarball URLs to redirect to a lockable immutable URLEelco Dolstra
Previously, for tarball flakes, we recorded the original URL of the tarball flake, rather than the URL to which it ultimately redirects. Thus, a flake URL like http://example.org/patchelf-latest.tar that redirects to http://example.org/patchelf-<revision>.tar was not really usable. We couldn't record the redirected URL, because sites like GitHub redirect to CDN URLs that we can't rely on to be stable. So now we use the redirected URL only if the server returns the `x-nix-is-immutable` or `x-amz-meta-nix-is-immutable` headers in its response.
2023-04-09fix failing configure in nix-testsPhilipp Otterbein
2023-03-31Remove nixpkgsFor flake outputEelco Dolstra
Fixes "warning: unknown flake output 'nixpkgsFor'".
2023-03-31Merge pull request #8018 from tweag/ssh-password-promptThéophane Hufschmitt
SSH: don't erase password prompt if it is displayed
2023-03-24Filter tests/nixos from sourceAlexander Bantyev
2023-03-22Add a test for nix copy over sshAlexander Bantyev
Check that nix copy can copy stuff, refuses to copy unsigned paths by default, and doesn't hide the ssh password prompt.
2023-03-20Fix internal-api rendering in HydraEelco Dolstra
Currently it gives a 500 error with "Do not know how to serve path '/nix/store/bym5sm8z2wpavnvzancb9gjdlgyzs1l8-nix-internal-api-docs-2.15.0pre20230320_e37f436/share/doc/nix/internal-api'."
2023-03-14Merge pull request #7989 from sysedwinistrator/flake-compat-sha256-mrThéophane Hufschmitt
add flake-compat to flake.nix and use sha256 in default.nix
2023-03-10Generate API docs with DoxygenJohn Ericson
The motivation is as stated in issue #7814: even though the the C++ API is internal and unstable, people still want it to be well documented for sake of learning, code review, and other purposes that aren't predicated on it being stable. Fixes #7814 Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-03-08Run 'make installcheck' againEelco Dolstra
This was failing because the check for the existence of the 'installcheck' target failed silently, so the whole phase got skipped. It works by running 'make -n installcheck 2> /dev/null', which however barfs with /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld.gold: error: cannot open tests/plugins/plugintest.o: No such file or directory Fixes #8004.
2023-03-08Fix coverage jobEelco Dolstra
https://hydra.nixos.org/build/211747539
2023-03-06add flake-compat to flake.nix and use sha256 in default.nixEdwin Mackenzie-Owen
2023-03-03Merge pull request #7946 from cole-h/restore-static-bin-distEelco Dolstra
flake: restore binary-dist artifact to Hydra static builds
2023-03-02flake: restore binary-dist artifact to Hydra static buildsCole Helbling
2023-03-02Fix 'make check' inside 'nix develop'Eelco Dolstra
2023-02-28flake.nix: Force the ./configure tests setting Robert Hensing
This always forces the setting, rather than relying on its default, and cleans up the code a bit. Co-authored-by: John Ericson <git@JohnEricson.me>
2023-02-24Add ./configure --disable-tests optionRobert Hensing
Building without tests is useful for bootstrapping with a smaller footprint or running the tests in a separate derivation. Otherwise, we do compile and run them. This isn't fine grained as to allow picking `check` but not `installcheck` or vice versa, but it's good enough for now. I've tried to use Nixpkgs' `checkInputs`, but those inputs weren't discovered properly by the configure script. We can emulate its behavior very well though.
2023-02-22Fix the static buildEelco Dolstra
It doesn't produce a "debug" output, so the build failed without an error message in Hydra (https://hydra.nixos.org/build/210121811).
2023-02-21Fix `isStatic` arguments to `commonDeps`John Ericson
Some dependencies supposed to be skipped in the cross build, along with not using the gold linker. But in https://github.com/NixOS/nix/pull/6538 this was accidentally not preserved. Also since https://github.com/NixOS/nix/pull/6538 we saw some new aarch64-linux static build failures. This is a first attempt to try to fix those failures. If this is not sufficient, there are other things we can try next.
2023-02-20Nix's own flake: Dedup and memoize moreJohn Ericson
- `nixpkgsFor` does all of native, static, cross, and the different stdenvs. - The main Nix derivation is no longer duplicated for static. - DRY nixpkgs.lib and lib.genAttrs calls.
2023-02-20Merge pull request #7433 from yorickvP/improv-onboardingThéophane Hufschmitt
Improve hacking.md and add clangd+bear to devshell
2023-02-13Improve hacking.mdYorick van Pelt
- Refer to current version in readme - Split into flakes and non-flakes section - Change order to move nix-build to the end, since people often start with it in the beginning. - Use proper "Note" syntax - Add notes about editor integration - Move information about target platforms and stdenvs into separate sections Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Alexander Bantyev <alexander.bantyev@tweag.io> Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-02-10flake.nix: add clangd and bearYorick van Pelt
2023-02-07Add a basic daemon authorization testRobert Hensing
2023-01-27Merge pull request #7648 from hercules-ci/move-nixos-testsThéophane Hufschmitt
Move nixos tests
2023-01-24Fix the coverage jobJohn Ericson
See https://hydra.nixos.org/build/206790960
2023-01-24Merge pull request #7679 from hercules-ci/re-add-boehmgc-patchRobert Hensing
Revert "fixup: remove boehmgc patch"
2023-01-24Actually complete the revertRobert Hensing
2023-01-23Try to fix #7669John Ericson
The issue *seems* to be the cross jobs, which are missing the `CXXFLAGS` needed to get rapidcheck. PR #6538 would be really nice to resurrect which will prevent the `configureFlags` from going out of sync between the regular build and the cross build again.
2023-01-23Add `rapidcheck` dependency for testingJohn Ericson
Property tests are great! Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2023-01-20Use the official, documented NixOS runTest interfaceRobert Hensing
2023-01-20tests: Move NixOS tests to tests/nixosRobert Hensing
This will allow contributors to find them more easily.
2023-01-18flake.nix: Add nixpkgs/lib/tests as regression testRobert Hensing
2023-01-10manual: Check linksRobert Hensing
mdbook-linkcheck is not consistent about its warning setting. It disables some warnings, but not the warnings about lack of fragment checking support; hence the extra filtering.
2022-12-23Merge pull request #7367 from lheckemann/nixpkgs-22.11Eelco Dolstra
Bump nixpkgs to 22.11
2022-12-13Build Nix with the GC disabled in hydraThéophane Hufschmitt
Make sure that it still compiles as it's easy to accidentally break one of the `#if` guarded clauses
2022-12-07flake.nix: Use nixpkgs.lib.fileContentsRobert Hensing
2022-12-07.version: Add newlineRobert Hensing