-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
48 lines (45 loc) · 1.14 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
43
44
45
46
47
48
{
pkgs ? import <nixpkgs> { },
}:
let
# Use a patched version of openocd with DirtyJTAG support.
openocd = pkgs.openocd.overrideAttrs (old: {
# ./bootstrap isn't included in release tarballs
src = pkgs.fetchgit {
url = "https://git.code.sf.net/p/openocd/code";
rev = "v0.12.0";
fetchSubmodules = false;
hash = "sha256-z0bNDPDLBEFxNtKsDWu6n8YRn1NzULxCz4bnSn8Iiyc=";
};
patches = [
(pkgs.fetchpatch {
url = "https://review.openocd.org/changes/openocd~7344/revisions/23/patch?download";
decode = "base64 -d";
hash = "sha256-6CxMJ6l933CV7V88GRCvE/UtYV30BaQ08byf14MGurE=";
})
];
preConfigure = "./bootstrap nosubmodule";
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgs.autoconf
pkgs.automake
pkgs.libtool
pkgs.which
];
});
in
pkgs.mkShell {
venvDir = ".venv";
packages = [
pkgs.python311.pkgs.venvShellHook
openocd
pkgs.yosys
pkgs.verilator
# Needed by Verilator simulations
pkgs.json_c
pkgs.libevent
pkgs.zlib
];
postVenvCreation = ''
${pkgs.uv}/bin/uv pip install -r requirements.txt
'';
}