Skip to content

Commit

Permalink
Add a Nix-shell script
Browse files Browse the repository at this point in the history
For Nix package manager users (or NixOS users), the new `shell.nix`
script plops you into an environment with all the tools necessary for
general Tock development:

  * `rustup`
  * `gcc-arm-embedded` (I think this one can go away when we switch to
LLVM tools that ship with Rust)
  * `tockloader`, which is used for interacting with the dev boards
  • Loading branch information
alevy committed Jul 4, 2018
1 parent 185e71f commit bc41a1c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/Getting_Started.md
Expand Up @@ -13,6 +13,11 @@ developing Tock.

### Super Quick Setup

Nix:
```
$ nix-shell
```

MacOS:
```
$ curl https://sh.rustup.rs -sSf | sh
Expand Down
32 changes: 32 additions & 0 deletions shell.nix
@@ -0,0 +1,32 @@
{ pkgs ? import <nixpkgs> {} }:

with builtins;
let
inherit (pkgs) stdenv;
pythonPackages = stdenv.lib.fix' (self: with self; pkgs.python3Packages //
{

tockloader = buildPythonPackage rec {
pname = "tockloader";
version = "1.1.0";
name = "${pname}-${version}";

propagatedBuildInputs = [ argcomplete colorama crcmod pyserial pytoml ];

src = fetchPypi {
inherit pname version;
sha256 = "0j15hrz45ay396n94m5i5pca5lrym1qjnj06b2lq9r67ks136333";
};
};
});
in
with pkgs;
stdenv.mkDerivation {
name = "moz_overlay_shell";
buildInputs = [
rustup
gcc-arm-embedded
python3Full
pythonPackages.tockloader
];
}

0 comments on commit bc41a1c

Please sign in to comment.