David Brown | 79c4fcf | 2021-01-26 15:04:05 -0700 | [diff] [blame^] | 1 | # SPDX-License-Identifier: Apache-2.0 |
Rajiv Ranganath | ce6fe63 | 2019-12-30 18:35:51 +0530 | [diff] [blame] | 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 | # |
| 13 | with import <nixpkgs> {}; |
| 14 | let |
| 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 |
David Vincze | 71b8f98 | 2020-03-17 19:08:12 +0100 | [diff] [blame] | 23 | python37.pkgs.cbor |
Rajiv Ranganath | ce6fe63 | 2019-12-30 18:35:51 +0530 | [diff] [blame] | 24 | ] |
| 25 | ); |
| 26 | in |
| 27 | myEnvFun { |
| 28 | name = "imgtool"; |
| 29 | |
| 30 | buildInputs = [ imgtoolPythonEnv ]; |
| 31 | } |