Newer
Older
let
sources = import nix/sources.nix;
in
{ pkgs ? import sources.release2015 {}
, pypiData ? sources.pypi-deps-db
, mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
let
providers = {
_default = "sdist,nixpkgs,wheel";
# not packaged in nixpkgs at all, we can use the binary wheel from
# pypi though.
python-challenge-bypass-ristretto = "wheel";
# Pure python packages that don't build correctly from sdists
# - patches in nixpkgs that don't apply
# - missing build dependencies
platformdirs = "wheel";
boltons = "wheel";
klein = "wheel";
humanize = "wheel";
chardet = "wheel";
urllib3 = "wheel";
zipp = "wheel";
};
tahoe-versions = {
"1.14.0" = {
requirements = builtins.readFile ./requirements/base.txt;
propagatedBuildInputs = [];
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
"1.16.0rc1" = rec {
requirements = builtins.readFile ./requirements/base-1.16.txt;
propagatedBuildInputs = [
(
mach-nix.buildPythonPackage {
python = "python27";
pname = "tahoe-lafs";
version = "1.16.0rc1";
inherit requirements providers;
postPatch = ''
cat > src/allmydata/_version.py <<EOF
# This _version.py is generated by nix.
verstr = "$version"
__version__ = verstr
EOF
'';
src = pkgs.fetchFromGitHub {
owner = "fenn-cs";
repo = "tahoe-lafs";
rev = "f6a96ae3976ee21ad0376f7b6a22fc3d12110dce";
sha256 = "ZN2V5vH+VqPaBmQXXqyH+vUiqW1YNhz+7LsiNNhA/4g=";
};
}
)
];
};
};
in
# (builtins.elemAt tahoe-versions."1.16.0rc1".propagatedBuildInputs 0)
#/*
mach-nix.buildPythonApplication rec {
python = "python27";
name = "zero-knowledge-access-pass-authorizer";
src = ./.;
inherit providers;
inherit (tahoe-versions.${tahoe-lafs}) requirements propagatedBuildInputs;
_.tahoe-lafs.patches = [
(
pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/PrivateStorageio/nixpkgs/privatestorageio/pkgs/development/python-modules/tahoe-lafs/rsa-exponent.patch";
sha256 = "sha256-0vIMj5gZPbKLkow6wpA+Tz7bpyy+mZRSSFGmpg0VMyk=";
}
)
];
format = "setuptools";
# Record some settings here, so downstream nix files can consume them.
meta.mach-nix = { inherit python providers; };
}
/**/