-
Notifications
You must be signed in to change notification settings - Fork 59
/
shell.nix
42 lines (39 loc) · 1.03 KB
/
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
/**
* @file "shell.nix"
* @author Ben Janis
* @brief Nix shell environment file
* @date 2024
*
* This source file is part of an example system for MITRE's 2024 Embedded System CTF (eCTF).
* This code is being provided only for educational purposes for the 2024 MITRE eCTF competition,
* and may not meet MITRE standards for quality. Use this code at your own risk!
*
* @copyright Copyright (c) 2024 The MITRE Corporation
*/
{ pkgs ? import <nixpkgs> {}
, fetchzip ? pkgs.fetchzip
, fetchgit ? pkgs.fetchgit
, fetchurl ? pkgs.fetchurl
, unzip ? pkgs.unzip
}:
pkgs.mkShell {
buildInputs = [
pkgs.gnumake
pkgs.python39
pkgs.gcc-arm-embedded
pkgs.poetry
pkgs.cacert
(pkgs.callPackage custom_nix_pkgs/analog_openocd.nix { })
pkgs.minicom
];
msdk = builtins.fetchGit {
url = "https://github.com/Analog-Devices-MSDK/msdk.git";
ref = "refs/tags/v2023_06";
};
shellHook =
''
cp -r $msdk $PWD/msdk
chmod -R u+rwX,go+rX,go-w $PWD/msdk
export MAXIM_PATH=$PWD/msdk
'';
}