-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
35 lines (31 loc) · 708 Bytes
/
shell.nix
File metadata and controls
35 lines (31 loc) · 708 Bytes
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
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
python3
python3Packages.pip
python3Packages.virtualenv
python3Packages.setuptools
go
gcc
stdenv.cc.cc.lib
zlib
libffi
openssl
pkg-config
];
shellHook = ''
# Crucial for binary python wheels on NixOS
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc.lib
pkgs.zlib
pkgs.libffi
pkgs.openssl
]}:$LD_LIBRARY_PATH"
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
source venv/bin/activate
# Re-install with the correct library paths available
pip install qiskit qiskit-aer numpy --quiet
'';
}