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
...but still allow for setting `dataDir` to a custom path. This gets
rid of the use of the deprecated option PermissionsStartOnly. Also, add
the ability to customize user and group, since that could be useful
with a custom `dataDir`.
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.
I manually audited the results and removed some results that were not valid.
Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.
Some observations:
- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
- gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
platforms that are not x86_64-linux
glibc's libcrypt is deprecated and since
ff30c899d8
is built by default without libcrypt, that's probably the point when `elasticsearch6`
started failing with
```
auto-patchelf: 3 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libcrypt.so.1 wanted by /nix/store/nd0gn95yfnnmnnw8zk2jnafc9gj2qy91-elasticsearch-6.8.21/modules/x-pack-ml/platform/linux-x86_64/lib/liblog4cxx.so.10
error: auto-patchelf could not satisfy dependency libcrypt.so.1 wanted by /nix/store/nd0gn95yfnnmnnw8zk2jnafc9gj2qy91-elasticsearch-6.8.21/modules/x-pack-ml/platform/linux-x86_64/lib/libaprutil-1.so.0
error: auto-patchelf could not satisfy dependency libcrypt.so.1 wanted by /nix/store/nd0gn95yfnnmnnw8zk2jnafc9gj2qy91-elasticsearch-6.8.21/modules/x-pack-ml/platform/linux-x86_64/lib/libapr-1.so.0
```
Let's add libxcrypt dependency, also note that `elasticsearch6-oss` doesn't
seem to need it.
Should resolve https://github.com/NixOS/nixpkgs/issues/203467
Extra note is elk6 may get removed from nixpkgs soon in favor of elk7
https://github.com/NixOS/nixpkgs/pull/194420