home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c327a07147e8947fab6b467c7dc0d584b2a7ec70
parent af09e3e7f29b8ccd151a664ba77545f146223159
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Tue, 22 Dec 2020 10:59:23 +0100

flake: add a test devshell

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mflake.nix | 16+++++++++++++---
Anix/shells/cargo.nix | 21+++++++++++++++++++++
2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -90,7 +90,7 @@ pkgsBySystem = forEachSystem (mkPkgs inputs.nixpkgs); # NixOS configurations - /* Creates a NixOS configuration from a `name` and a attribute set. + /* Creates a NixOS configuration from a `name` and an attribute set. The attribute set is composed of: - pkgs: the package set to use. To be taken from the inputs (inputs.nixos, …) - system: the architecture of the system. Default is x86_64-linux. @@ -149,7 +149,17 @@ specialArgs = { inherit name inputs; }; }); - # home-manager configurations + /* + mkHomeManagerConfiguration creates a home-manager configuration from a `name` (a user) and an attribute set. + The attribute set is composed of: + - config: the configuration path that will be imported, by default `./users/{name}/home.nix + + It loads home-manager specific modules and config and set a minimum set of configuration file + to integrate with flakes a bit better. + + It can be used in a configuration as following: + `home-manager.users.vincent = inputs.self.internal.homeManagerConfigurations."vincent";`. + */ mkHomeManagerConfiguration = name: { config ? ./users + "/${name}/home.nix" }: nameValuePair name ({ ... }: { imports = [ @@ -200,7 +210,7 @@ # Expose the development shells defined in the repository, run these with: # - # nix develop 'self#devShells.x86_64-linux.cargo' + # nix develop '.#devShells.x86_64-linux.cargo' devShells = forEachSystem (system: let pkgs = pkgsBySystem."${system}"; diff --git a/nix/shells/cargo.nix b/nix/shells/cargo.nix @@ -0,0 +1,21 @@ +{ pkgs ? import <nixpkgs> { } }: + +# This file contains a development shell for running and working on Cargo. +pkgs.mkShell rec { + name = "rustc-perf"; + buildInputs = with pkgs; [ + git + curl + gnumake + pkg-config + openssl + + rustup + + # Required for nested shells in lorri to work correctly. + bashInteractive + ]; + + # Always show backtraces. + RUST_BACKTRACE = 1; +}