Nix-ifying a Rust project

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • himalaya

    CLI to manage emails

  • rust-overlay

    Pure and reproducible nix overlay of binary distributed rust toolchains

  • It uses the oxalica overlay instead of the nixpkgs, mainly because I couldn't get rust-analyzer (required by the VSCode extension; see .vscode/ folder) working with the nixpkgs version.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • naersk

    Build Rust projects in Nix - no configuration, no code generation, no IFD, sandbox friendly.

  • 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

  • Home Manager using Nix

    Manage a user environment using Nix [maintainer=@rycee]

  • You can also use https://github.com/nix-community/home-manager to manage your dotfiles the Nix way.

  • xplr

    A hackable, minimal, fast TUI file explorer

  • Thanks for the post. I'm having trouble nixifying https://github.com/sayanarijit/xplr. Hopefully this post will help. Btw, does anyone know any github actions alternative?

  • crate2nix

    rebuild only changed crates in CI with crate2nix and nix

  • I like the way crate2nix works. I have made a flake template for it here. Sometimes it requires a couple of overrides to fix some misbehaving crates (see https://github.com/balsoft/simple-osd-daemons/blob/master/flake.nix#L29 for an example of such overrides), but otherwise it's fantastic. It doesn't require any hash nonsense, it downloads and builds all the crates separately (unlike naersk or other solutions) so you get all the benefits of Nix (reproducibility and proper caching).

  • nix-templates

    Nix Flake templates for various languages

  • I like the way crate2nix works. I have made a flake template for it here. Sometimes it requires a couple of overrides to fix some misbehaving crates (see https://github.com/balsoft/simple-osd-daemons/blob/master/flake.nix#L29 for an example of such overrides), but otherwise it's fantastic. It doesn't require any hash nonsense, it downloads and builds all the crates separately (unlike naersk or other solutions) so you get all the benefits of Nix (reproducibility and proper caching).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • simple-osd-daemons

    Mirror of https://code.balsoft.ru/balsoft/simple-osd-daemons

  • I like the way crate2nix works. I have made a flake template for it here. Sometimes it requires a couple of overrides to fix some misbehaving crates (see https://github.com/balsoft/simple-osd-daemons/blob/master/flake.nix#L29 for an example of such overrides), but otherwise it's fantastic. It doesn't require any hash nonsense, it downloads and builds all the crates separately (unlike naersk or other solutions) so you get all the benefits of Nix (reproducibility and proper caching).

  • crates.io-index

    Registry index for crates.io

  • ++ crate2nix generate -f ./Cargo.toml -o Cargo-generated.nix -h /nix/store/nzvk2yxgmcz0jkzpwsgl4wpvq43646pr-himalaya-crate2nix/cra> Error: while retrieving metadata about ./Cargo.toml: Error during execution of `cargo metadata`: error: no matching package named > location searched: registry `https://github.com/rust-lang/crates.io-index` required by package `himalaya v0.2.2 (/build/source)`

  • cargo2nix

    Granular builds of Rust projects for Nix

  • cargo2nix

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts