Nix-ifying a Rust project

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

Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SonarQube - Static code analysis for 29 languages.
  • Mergify - Updating dependencies is time-consuming.
  • 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.

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • naersk

    Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly. [maintainer: @Patryk27]

    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

    nix build file generator for rust crates

    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).

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • 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 caching, development shell, Nix & Rust integration

    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