-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
45 lines (40 loc) · 925 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Shell expression for the Nix package manager
#
# This nix expression creates an environment with necessary packages installed:
#
# * `tockloader`
# * arm-none-eabi toolchain
# * rustup
#
# To use:
#
# $ nix-shell
#
{ 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 = "tock-dev";
buildInputs = [
rustup
gcc-arm-embedded
python3Full
pythonPackages.tockloader
];
}