direnv
naersk
Our great sponsors
direnv | naersk | |
---|---|---|
157 | 6 | |
11,675 | 635 | |
1.8% | 2.7% | |
8.7 | 5.6 | |
9 days ago | 6 days ago | |
Go | Nix | |
MIT License | MIT License |
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.
direnv
-
Nix-direnv is a quality of life improvement
I also made the export diff configurable, motivated by this post: https://github.com/direnv/direnv/pull/1233
- Direnv – Unclutter Your .profile
-
Conditional Git Configuration
Nice.
For years I've been using [direnv](https://direnv.net/) for this, setting environment variables which git picks up. This looks like a more feature complete equivalent, although to be honest I only really need switching of committer email and the SSH key used.
- FLaNK 25 December 2023
-
Development Environments with Guix, similar to devenv.sh
Direnv, for the uninitiated, loads and unloads environment variables when directories are entered and exited. Under every project folder there is a `$PROJ_DIR/.envrc` which contains:
-
Emacs Advent Calendar 9: devdocs, code-cells, dREPL, etc.
buffer-env: A pure-Elisp version of the direnv utility. Useful to make Emacs aware of Python virtualenvs (which, judging by the questions posted here, is unfortunately still a complication for a lot of people). Similar to (and inspired by) envrc, but doesn't require the direnv program.
-
golang cli vs env var in windows?
You can look at direnv to see this in action as they wrote shell hooks that get loaded into the shell profile and are executed on every prompt. https://direnv.net/
-
Nix Survival Mode: macOS upgrades won't break Nix anymore
Yes, most Nix users employ https://direnv.net or the equivalent for your IDE of choice. Emacs for instance has https://github.com/purcell/envrc which set per-buffer variables.
- Direnv: Unclutter Your .profile
-
What Is Wrong with TOML?
The more applications I write, the more I tend to avoid typical config files in favor of using direnv [0] to set environment variables.
[0] https://direnv.net/
naersk
-
Help with building a 32bit library with cargo
i would also recommend using crane or naersk since iirc rustPlaform.buildRustPackage can mangle some of these options (or maybe i just did something wrong lol)
-
Nix & Rust - cargo2nix 0.11.0 released
Have a look at naersk, it neither requires generated Nix files nor IFD.
-
Nix and NixOS Get So Close to Perfect
We use naersk[0] for Rust projects in our Nix monorepo (for example [1]). It's pretty hands-off in terms of the Nix code needed (you don't need to pin hashes inside of the Nix code as long as you have a Cargo lockfile) and all the existing tooling keeps working fine.
The main drawback of it is that it currently builds all of your dependencies in one big derivation, so any dependency changes cause a full rebuild. There's some other project I saw fly by which attempts to do a similar thing but split each crate into a separate derivation, but I forgot what it's called and have no experience with it.
[0]: https://github.com/nix-community/naersk
[1]: https://cs.tvl.fyi/depot/-/blob/ops/journaldriver/default.ni...
-
Nixery – Docker images on the fly with Nix
You can also use naersk¹ if you want to avoid a two-step process. It's especially convenient when using nix flakes.
¹https://github.com/nix-community/naersk
-
niv, naersk, napalm: moving on
I created https://github.com/nmattia/napalm/issues/34 and https://github.com/nmattia/naersk/issues/183 to move them to nix-community
-
Nix-ifying a Rust project
sounds exactly like what naersk does. naersk doesn't need a cargSha256 argument since it downloads dependencies from Cargo.lock. it can also grab the version number from Cargo.toml
What are some alternatives?
spaceship-prompt - :rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt
crate2nix - rebuild only changed crates in CI with crate2nix and nix
Pipenv - Python Development Workflow for Humans.
rust-overlay - Pure and reproducible nix overlay of binary distributed rust toolchains
lorri - Your project's nix-env
cargo2nix - Granular builds of Rust projects for Nix
Home Manager using Nix - Manage a user environment using Nix [maintainer=@rycee]
nix-direnv - A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]
Neovim-from-scratch - 📚 A Neovim config designed from scratch to be understandable
crane - A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.
Poetry - Python packaging and dependency management made easy
nix2container - An archive-less dockerTools.buildImage implementation