1# SPDX-License-Identifier: Apache-2.0
2#
3# Nix environment for imgtool
4#
5# To install the environment
6#
7# $ nix-env --file imgtool.nix --install env-imgtool
8#
9# To load the environment
10#
11# $ load-env-imgtool
12#
13with import <nixpkgs> {};
14let
15  # Nixpkgs has fairly recent versions of the dependencies, so we can
16  # rely on them without having to build our own derivations.
17  imgtoolPythonEnv = python37.withPackages (
18    _: [
19      python37.pkgs.click
20      python37.pkgs.cryptography
21      python37.pkgs.intelhex
22      python37.pkgs.setuptools
23      python37.pkgs.cbor2
24      python37.pkgs.pyyaml
25    ]
26  );
27in
28myEnvFun {
29  name = "imgtool";
30
31  buildInputs = [ imgtoolPythonEnv ];
32}
33