-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathshell.nix
55 lines (45 loc) · 1.37 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
49
50
51
52
53
54
55
let
#channels = builtins.fetchTarball https://d3g5gsiof5omrk.cloudfront.net/nixpkgs/nixpkgs-18.03pre117623.29f4775103/nixexprs.tar.xz;
channels = builtins.fetchTarball https://d3g5gsiof5omrk.cloudfront.net/nixos/unstable/nixos-18.03pre126063.95880aaf062/nixexprs.tar.xz;
nixpkgs = import channels { config.allowUnfree = true; };
#nixpkgs = import <nixpkgs> {};
in
{ pkgs ? nixpkgs }:
let
inherit (pkgs) lib stdenv;
python = pkgs.python36;
pythonPackages = pkgs.python36Packages;
python-bitcoinlib = pkgs.callPackage ./python-bitcoinlib.nix {
inherit pythonPackages;
};
base58 = pkgs.callPackage ./base58.nix {
inherit pythonPackages;
};
plyvel = pkgs.callPackage ./plyvel.nix {
inherit python pythonPackages;
};
utxo-dump = pkgs.callPackage ./. {
inherit pythonPackages python plyvel base58 python-bitcoinlib;
};
btcpy = pkgs.callPackage ./btcpy.nix {
inherit pythonPackages base58;
};
in
pkgs.stdenv.mkDerivation {
name = "shell";
buildInputs = with pkgs; [
pv
python
pythonPackages.ipython
pythonPackages.ecdsa
utxo-dump
btcpy
];
shellHook = ''
# workaround some darwin + python36 bug
export DYLD_LIBRARY_PATH="${pkgs.leveldb}/lib"
export NIX_PATH="nixpkgs=${toString pkgs.path}"
echo -n 'nixpkgs version: '
nix-instantiate --eval -E '(import <nixpkgs> {}).lib.nixpkgsVersion'
'';
}