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