In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Projects like mix2nix and my own project, deps_nix, are collecting a
growing number of workarounds for packages that depend on the working
directory of a build to have the same name as the package.
See for example: da2ebc2c63
This change makes the pname of Hex packages equal the package name, so
that such workarounds aren't necessary.
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
elixir-ls 1.18.0 changed the name of the `debugger.sh` (which we call
`elixir-debugger`) script to `debug_adapter.sh`, so the new name in this package
is `elixir-debug-adapter`.
* mixRelease: format code by nixpkgs-format
* mixRelease: investigate why erlang is referenced in resulting derivation
* mixRelease: organize nativeBuildInputs and buildInputs
It:
+ organizes `nativeBuildInputs` in a structured way.
+ moves `builtins.attrValues mixNixDeps` to `nativeBuildInputs`, because it's only used in compile-time
* mixRelease: remove current attempt for removing erlang references in resulting derivation
As said in the comment about "remove erlang references in resulting
derivation", for now, we don't have a robust method to do that.
Although these removed code did some work, they did not achieve the
final goal - remove erlang references in resulting derivation.
Therefore, it is better to remove them and provide future implementation
with a clean foundation.
> If you want to find these old codes, you can also retrieve them from
> the git history.
* mixRelease: remove all files for Microsoft Windows
* mixRelease: add new option - `removeCookie`
* mixRelease: polish comments
+ Capitalize the sentences.
+ Add punctuation marks.
+ Format a little code.
* mixRelease: wrap programs in $out/bin with their runtime deps
* mixRelease: commit what happysalada suggests
---------
Co-authored-by: c4710n <c4710n@users.noreply.github.com>
* fix: only substitute ERTS for escript builds in rebar3Relx
Previously beamPackages.rebar3Relx substituted references to erlang
for all builds, which only works for escript builds.
Fixes#261354
* doc: add comment mentioning fixed issue