Shikanime
Ideas to streamline external package management
Lately we have seen a lot of discussion and packages related to packages outside Hex and Beam ecosystem, like ESbuild, Bazel for XLA, binary build caching… Most of the problems were encountered in the Haskell community, which led to the integration of Nix into most of the Haskell tooling.
I think Nix could be a good solution to solve the problem within the Beam community too, on the shoulder of the giant, what do you think?
Nix is a tool that I already use every day for each of my projects, including JVM based, Go, Elixir, Rust, Python and Tensorflow (I prefer it to ASDF because Nix doesn’t need you to understand the build and system library requirements of certain packages such as Python and Erlang).
Long story short, Nix is a Unix distribution agnostic package manager (with cachix as the global build cache), frequently updated (https://repology.org/), that aims to minimize the system scope requirements for building and running application.
Nix: GitHub - NixOS/nixpkgs: Nix Packages collection & NixOS · GitHub
Stack’s Nix integration: https://docs.haskellstack.org/en/stable/nix_integration/
Cabal’s Nix integration: https://cabal.readthedocs.io/en/latest/nix-integration.html
Most Liked
dimitarvp
Which problem though?
webuhu
I jive in. There are a good dozen of Nix BEAMers. I’m one of them.
And for projects where needed (projects with external dependencies) it really works like a charme for me.
Even for projects with PosgreSQL I could spin up a development environment with one command.
And with pinning Nixpkgs (the versions used) I’m 100% certain a project will build again in a couple of years without searching for legacy dependency versions.
On excellent macOS support is worked on as far as I know.
Native Windows support is not something that will be finished soon.
As Windows user I use WSL2 for the projects with Nix. Pre WSL2 a had a virtual machine running myself.
So no I don’t see nix getting mainstream soon.
But for me it’s the best thing to get for this kind of dependencies problems.
webuhu
What I could see soon, we the community will start writing some guides for developing / deploying with Nix somewhere in our projects.
But I would still wait until Nix flakes are ready.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








