After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.
Diff: <https://github.com/intel/linux-sgx/compare/sgx_2.24...sgx_2.25>
Changelog: <https://github.com/intel/linux-sgx/releases/tag/sgx_2.25>
This diff decouples the `sgx-psw` and `sgx-sdk` builds. We only need some
headers and a single tool (`sgx_edger8r`) from the base sdk in order to build
`sgx-psw`. The biggest benefit here is that I can quickly iterate on `sgx-psw`,
which takes just 3 min to build, vs. waiting 1+ hour to build both `sgx-sdk`
and `sgx-psw`.
`sgx-sdk` is also broken in an inscrutable way with 2.25 and I don't really
have the patience to waste more time on it. Now I can update the only useful
artifact (the `aesmd` service from `sgx-psw`) without wasting time on the sdk.
- Normally SGX has a SIM mode for running enclave tests on non-Intel SGX
capable hardware; however, these tests do some tricky stuff with cpuid
and CPU trap handling that make them non-portable.
- This diff makes it so OfBorg (which can't _run_ the tests) at least
builds them. The tests are also split out into a separate derivation
to save my sanity when iterating on them, since sgx-ssl takes like 30
min to build...
Context:
The `aesm_service` binary depends on a vendored library called
`CppMicroServices`. At build time, this lib creates and then bundles
service resources into a zip file and then embeds this zip into the
binary. Without changes, the `aesm_service` will be different after every
build because the embedded zip file contents have different modified times.
All credits to @haraldh for this patch <3
Without the change build fails on `master` as
https://hydra.nixos.org/build/247706272:
local_cache.cpp: In function 'void throw_if(bool, const std::string&)':
local_cache.cpp:40:20: error: 'runtime_error' is not a member of 'std'
40 | throw std::runtime_error(error);
| ^~~~~~~~~~~~~
local_cache.cpp:17:1: note: 'std::runtime_error' is defined in header '<stdexcept>'; did you forget to '#include <stdexcept>'?
16 | #include <sys/file.h>
+++ |+#include <stdexcept>
17 | #include <sys/stat.h>
* Updated platform enclaves.
* Re-enable parallel build; seems to work properly across several
different machines.
* Ensure all non-enclave libs get stripped so we don't add `gcc` to the
runtime closure.
* I'm not sure what the value of providing a non-platfrom /bin/mount is
for non-NixOS users for a service that isn't used that only bloats
closure size.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
Currently, the sgx-sdk.runTestsHW attribute fails to build due to
linking errors. It looks like OpenSSL versions are mixed up.
And indeed sgx-sdk pulls in OpenSSL 3 while ipp-crypto pulls in
OpenSSL 1.1.
Fix by pinning the OpenSSL version for the SGX SDK to OpenSSL 1.1 as
well.
Changes sgx-psw to append `aesm` to `LD_LIBRARY_PATH`:
- Append instead of prepend to allow for overriding in service config
- As we already add a wrapper to add `aesm` to `LD_LIBRARY_PATH` it is
not necessary to also set in `LD_LIBRARY_PATH` of the systemd service.
Co-authored-by: Vincent Haupert <mail@vincent-haupert.de>