node2nix
nix-cde
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
node2nix
-
The Magic Nix Cache
You may find something like node2nix helpful (https://github.com/svanderburg/node2nix). This converts your package.json into a Nix expression that can then be cached. You're right that it does require some setup and a bit of Nix knowledge but could yield significant benefits and take a good chunk out of that 20 minutes.
Another option might be to use pnpm instead of Yarn and cache your pnpm dependencies. pnpm actually works a bit like Nix in that it creates a pnpm-lock.yaml file with content-based hashes for the full package.json dependency tree. This enables it to quickly determine which parts of the dependency tree it needs to build and which are already available.
-
Override `nodePackages' with the `default.nix' from `node2nix' multiple times
I got it from this github issue in the node2nix repo.
-
how to install Mozilla's readability library?
As Gerschtli commented, it may be possible to generate a Nix expression for @mozilla/readability using node2nix. Then get its node_modules path like this and set NODE_PATH to the value.
-
How to install dependencies with Nix?
For node programs, you may be able to find the commands as just packages, or look at https://github.com/svanderburg/node2nix for creating the nix equivalent of a node-modules
nix-cde
-
The Magic Nix Cache
This is what I'm using with gitlab: https://github.com/takeda/nix-cde/blob/master/contrib/gitlab...
-
Using Nix as an alternative to dev containers in VScode.
I myself use https://github.com/takeda/nix-cde it just wraps other projects in an opinionated way and contains the boiler plate that I would normally use otherwise.
-
As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…
There's a project that does this with using Nix: https://github.com/takeda/nix-cde (this is a wrapper around https://github.com/nix-community/poetry2nix)
- Docker multi-stage build with Poetry
-
Python 3.11 delivers.
I personally use this: https://github.com/takeda/nix-cde it has the benefit of a reproducible build environment, but unfortunately anything involving Nix has a steep learning curve.
-
The perfect way to handle project-specific developer configs
I use this myself: https://github.com/takeda/nix-cde
-
Asdf – the language tool version manager
I don't use NixOS myself, but have Nix installed on my Mac, and it seems to provide all functionality of package or version managers I needed.
I think though it is more complex because it is a programming language that provides this functionality instead of purpose build tool like asdf.
For my needs I created a framework for development: https://github.com/takeda/nix-cde to avoid cruft of including the same things over and over in my projects.
-
Use `Python -m Pip`
Not an OP, but I became a big fan of using poetry for managing dependencies. For managing python version I started using Nix package manager. It allows to describe all dependencies via code, but with time that code became a boilerplate, so I created this: https://github.com/takeda/nix-cde
It works very well for me so far.
What are some alternatives?
nixpkgs - Nix Packages collection & NixOS
hasql-interpolate
nix-npm-buildpackage - Build nix packages that use npm/yarn
aws-lambda-python-runtime-interface-client
nur-packages - My NUR packages
nixml - NIX + YAML for easy to use reproducible environments
readability-cli
globus-timer-cli - CLI for interacting with the Timer API
at-node-nix - Node.js Nix expressions
m1-terraform-provider-helper - CLI to support with downloading and compiling terraform providers for Mac with M1 chip
asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more