-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathshell.nix
45 lines (42 loc) · 1.24 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
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
pkgs = import nixpkgs { config = {allowUnfree = true;}; overlays = []; };
in
let
pythonPackages = pkgs.python311Packages;
in pkgs.mkShellNoCC {
venvDir = "./.venv";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ];
packages = with pkgs; [
# Python 3.11
pythonPackages.python
pythonPackages.pip
pythonPackages.sphinx
# This executes some shell code to initialize a venv in $venvDir before
# dropping into the shell
# TODO: consider use setuptoolsBuildHook, as documented in https://nixos.org/manual/nixpkgs/stable/#python
pythonPackages.venvShellHook
# houskeeping
wget
just
sphinx
git
neovim
glib
unzip
mesa
cmake
zsh
# hardware
# verible is only supported on Linux (x86_64-linux, i686-linux and aarch64-linux)
# https://search.nixos.org/packages?channel=23.11&show=verible&from=0&size=50&sort=relevance&type=packages&query=verible
svls
]
++ (pkgs.lib.optionals pkgs.stdenv.isLinux [ verible ]);
postShellHook = ''
# install mase as a package
sudo -H python3 -m pip install -e .
# add env variables
source scripts/init-nix.sh
'';
}