Giter VIP home page Giter VIP logo

rust-nix-shell's Introduction

rust-nix-shell

Have you ever found yourself wanting to work on a rust project on NixOS without having to write a flake.nix or a shell.nix for that project? You need rust-nix-shell, a program halfway between rustup and nix-shell! No more are the glibc errors that plague rustup on NixOS; gone are the horrible nix-shell -E '...' incantations to set RUST_SRC_PATH properly in an ephemeral shell.

rust-nix-shell allows you to create a shell environment with any version of rust, à la rustup. You can also specify other dependencies with -p, à la nix-shell.

Note

This program is intended for use on NixOS. If your system is not NixOS then I'd recommend using rustup instead of this --- unless you know that you want a nix-based rust environment, you probably don't.

Dependencies

This program shells out to nix-shell, finding it from $PATH. It also by default calls zsh from $PATH, but this is configurable

Optionally, if a copy of fenix is found at <fenix> (in $NIX_PATH), it will be used instead of downloading fenix master using fetchtarball every time.

Installation

This repository is a flake, providing the output rust-nix-shell.

The recommended way of installing this is by adding it to your system configuration. (For an example, look at my system flake)

Failing that, it can be run ephemerally with nix run:

nix run 'github:Sciencentistguy/rust-nix-shell' -- [rust-nix-shell arguments]

Or, it can be installed using nix profile:

nix profile install 'github:Sciencentistguy/rust-nix-shell'

For backwards compatibility, a default.nix is provided, allowing rust-nix-shell to be installed using nix-env:

nix-env -f 'https://github.com/Sciencentistguy/rust-nix-shell/archive/master.tar.gz' -i rust-nix-shell

Usage

rust-nix-shell --help

You can specify the channel as an optional argument. This must be one of:

  • stable
  • beta
  • nightly
  • A specific nightly: nightly-YYYY-mm-dd
  • A rust tagged release, e.g. 1.60 or 1.58.1

Available under the terms of version 2.0 of the Mozilla Public Licence

rust-nix-shell's People

Contributors

renovate[bot] avatar sciencentistguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rust-nix-shell's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • clap 4.0.32
  • indoc 2.0.0
  • lazy_static 1.4.0
  • regex 1.9.6
circleci
.circleci/config.yml
  • rust 1.6.1

  • Check this box to trigger a request for Renovate to run again on this repository

Great! but how to use it ?

Could you provide detail step to use it? For those who know nothing on nix, actually have no idea on to do with this repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.