From d2753504ef2bd591ade35851dad31d3aac117e19 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 14 May 2020 18:16:07 +0000 Subject: shells: init --- shells/README | 27 +++++++++++++++++++++++++++ shells/linux.nix | 15 +++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 shells/README create mode 100644 shells/linux.nix (limited to 'shells') diff --git a/shells/README b/shells/README new file mode 100644 index 000000000000..388ce777448e --- /dev/null +++ b/shells/README @@ -0,0 +1,27 @@ + ======== + + ======== + +This is a collection of Nix expressions for use with nix-shell. + +The idea is that if I'm working on a bunch of Rust programs, I don't +want to have to copy or write a shell.nix with all the standard Rust +stuff for every program -- rustc, cargo, rust-analyzer, etc. + +So instead of doing that, I have a "shells" directory in my NIX_PATH, +containing a "rust.nix" file. When I just want to build some program +as a one off, I'll just do this: + + nix-shell rust.nix + +And if it's something I'm going to be working on long term, and I want +to use lorri and stuff, I can create a shell.nix that just contains + + import + +I could even extend it with project-specific dependencies like +pkg-config or OpenSSL. + +Either way, I can now just modify rust.nix to add things to all my +Rust environments at once, and store these environments with all my +other Nix configuration. Yay! diff --git a/shells/linux.nix b/shells/linux.nix new file mode 100644 index 000000000000..35d3532a1c16 --- /dev/null +++ b/shells/linux.nix @@ -0,0 +1,15 @@ +{ pkgs ? import ../. {} }: +with pkgs; + +mkShell { + buildInputs = [ + bison flex bc libelf openssl + + # For make {n,menu}config + ncurses pkgconfig + + # For documentation + graphviz imagemagick python3Packages.sphinx python3Packages.sphinx_rtd_theme + texlive.combined.scheme-minimal + ]; +} -- cgit 1.4.1