Commit Graph

31 Commits

Author SHA1 Message Date
Adam C. Stephens
922a9d65f4 beamPackages.buildMix,buildRebar3: merge args.env with builder env 2026-03-26 23:37:53 -04:00
Adam C. Stephens
d1972278b5 beamPackages.buildMix: move phases to hooks 2026-02-13 09:58:15 -05:00
Adam C. Stephens
8bdef3ae03 beamPackages.buildMix: update to use fixed point 2026-02-12 23:09:29 -05:00
Luke Bailey
185c1b5de9 buildMix: Default to allowing local networking on darwin 2025-11-28 18:12:05 +00:00
Larry May
6a2ab79946 buildMix support for MIX_TARGET 2025-08-26 19:40:46 -04:00
Asherah Connor
6c8c88c622 buildMix: default to removing target config
See previous discussion at https://github.com/NixOS/nixpkgs/pull/429770.
cc @adamcstephens.

This is equivalent to giving `appConfigPath` an empty directory, but
expresses intent better (and doesn't require throwing an empty directory
into the store).

The Elixir ecosystem assumes [1] that dependencies are compiled without
their config; the `config/` directory is therefore used in library-only
projects to supply config values only intended for use when _developing_
them.  This leads to errors only seen in Nix when compile-time config
lacks runtime equivalents in end-user applications (per the whole
conversation at [1]).

Right now, the only way to get `buildMix` to build without config is to
manually remove the target's config directory in a hook/override, or (as
above) give `appConfigPath` an empty directory.  This PR adds a clearer
mechanism, and makes it the default.

[1] https://github.com/dashbitco/lazy_html/pull/11#issuecomment-3138715485

Tested with a `mix2nix`-using package that this functions as expected,
and with some `deps_nix`-using ones that `appConfigPath` still does too.
2025-08-02 12:52:16 +10:00
Peder Bergebakken Sundt
97262ee871 treewide: replace stdenv.is with stdenv.hostPlatform.is 2025-06-04 19:01:03 +02:00
Luke Bailey
f1cb7effb5 buildMix: use . instead of glob pattern for copying source
buildMix currently uses $src/* when copying source files into $out.
However, this does not include important hidden files like
`.formatter.exs` which contains custom package formatters, for example.
2025-05-18 00:24:39 +01:00
Adam C. Stephens
a293bbb210 beam: fix locale errors on darwin
C.UTF-8 is non-standard and generates errors such as:

bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): Bad file descriptor
2025-03-01 17:53:23 -05:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
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 a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Mathew Polzin
2d5053fca3 beamPackages.mixRelease: Make determinism toggleable 2023-12-08 07:23:35 +00:00
c4710n
c865c66216 beamPackages.buildMix: remove erlang references from output 2023-12-08 07:23:35 +00:00
Adam Stephens
fcbfef1e43 buildMix: copy package.json to support phoenix builds 2023-09-14 08:24:16 +00:00
Kerstin Humm
e5b6a21a70 beam/buildMix: add appConfigPath arg
This is added for Mobilizon to be able to let it's dependencies read
it's config directory
2023-09-07 08:59:40 +00:00
Andrew Bruce
56f1e95e09 buildMix: use C.UTF-8 locale
Avoid the following during mix builds:

warning: the VM is running with native name encoding of latin1 which may
cause Elixir to malfunction as it expects utf8.
2023-09-02 12:14:21 +01:00
Shawn8901
a59dda942c treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
happysalada
b1b78ac65d mix: add build mix and mix-release configure-hook 2021-08-04 12:05:00 +09:00
Milan Pässler
eae65a197d beam/buildMix: pass on custom nativeBuildInputs
3bc80f1938 changed buildInputs to
nativeBuildInputs, but broke specifying custom nativeBuildInputs.
2021-06-08 11:13:52 +09:00
happysalada
2a87cb7a8b build-mix buildRebar3: strip out derivation for NIFs 2021-06-07 10:03:48 +09:00
happysalada
3bc80f1938 buildMix: switch buildInputs to nativeBuildInputs 2021-06-07 10:03:48 +09:00
happysalada
af0844c7a2 beam: nixpkgs-fmt 2021-06-03 22:15:31 +09:00
ydlr
a2f3a63953 restore buildMix and its bootstrapper (#122374)
* restore mixBuild

remove bootstrapper by going through ERL_LIBS
mix will use ERL_LIBS to find compiled dependencies

Co-authored-by: Zach <zach@hipcreativeinc.com>
2021-05-17 08:05:40 +09:00
happysalada
481832b32d beam-modules: buildMix -> mixRelease 2021-04-08 20:54:48 +09:00
Ben Siraphob
2f78ee7e81 pkgs/development: stdenv.lib -> lib 2021-01-24 00:16:29 +07:00
Thomas Depierre
8de4654d4b beam-modules/hex-snapshot: remove
The package set is not maintained. It is also not used by most of the
BEAM community. Removing it to allow a more useful set of tools fit to
the BEAM community in Nixpkgs.
2019-11-17 13:45:57 +01:00
Yorick van Pelt
662fcf6a40 build-mix: partially revert nixpkgs#25655 2019-07-16 11:06:56 +02:00
Eric Litak
a6e35f2454 buildMix: properly ignore deps 2017-08-18 00:31:42 -07:00
Eric Merritt
b1cd08246f beamPackages: turn on debug_info for beam packages
This allows you to turn on debug infor for all the beam packages in the
system with a single change at the top level. This is required for
debugging and dialyzer work. It also allows you to switch it on on a
package by package basis.
2016-06-15 07:20:01 -07:00
Eric Merritt
2e61bd72a1 beamPackages: add the ability to override phases 2016-06-15 07:19:44 -07:00
Eric Merritt
be5da0449e beam-support: update registry to latest '59b836d' 2016-04-23 19:03:28 -07:00
Eric Merritt
8dbcb4e35e beamPackages: Add support for Mix and Erlang.mk 2016-04-23 19:03:24 -07:00