devbox
devbox copied to clipboard
support for more complex package definitions
What problem are you trying to solve?
I use elixir, and also need the underlying erlang implementation to be built with odbc support. the way nix builds the package does not include this by default.
What solution would you like?
Use the erlang_odbc_javac version for elixir would resolve the issue for most people but also leads to potential bloat for some people. Another way would be supporting the syntax the flake can, (pkgs.beam.packagesWith erlang_odbc_javac@latest).elixir@latest;
Alternatives you've considered
using the flake system you can do
{
description = "My flake.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
erlang = pkgs.beam.interpreters.erlang_25_odbc_javac;
elixir = (pkgs.beam.packagesWith erlang).elixir_1_14;
in
{
packages = {
erlang = erlang;
elixir = elixir;
};
});
}
which works around my issue, but now i have a flake that needs to update as well as the devbox.json and just seems likely to bite me in the long run