diff --git a/.envrc b/.envrc new file mode 100644 index 0000000000..3550a30f2d --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 08107a6644..eb4221f2ac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /home /local-rustup /snapcraft +flake.lock diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000..a4cfbec25b --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +# This is a cheap nix flake for direnv use for developing +# Rustup if you are running on NixOS. +# +# We deliberately don't commit a flake.lock because we only +# provide this for developers, not as a way to have rustup +# built for NixOS. + +{ + inputs = { flake-utils.url = "github:numtide/flake-utils"; }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + stdenv + openssl + pkg-config + ]; + }; + }); +}