Skip to content
Snippets Groups Projects
Commit 03954104 authored by Tom Prince's avatar Tom Prince
Browse files

1.16 support v2

parent 6815437f
No related branches found
No related tags found
1 merge request!239Switch to using mach-nix for python packaging.
......@@ -9,6 +9,7 @@ in
let
providers = {
_default = "sdist,nixpkgs,wheel";
tahoe-lafs = "nixpkgs";
# not packaged in nixpkgs at all, we can use the binary wheel from
# pypi though.
python-challenge-bypass-ristretto = "wheel";
......@@ -26,30 +27,49 @@ in
tahoe-versions = {
"1.14.0" = {
requirements = builtins.readFile ./requirements/base.txt;
propagatedBuildInputs = [];
overridesPre = [];
_.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=";
}
)
];
};
"1.16.0rc1" = rec {
requirements = builtins.readFile ./requirements/base-1.16.txt;
propagatedBuildInputs = [
_ = {};
overridesPre = [
(
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.
self: super: {
tahoe-lafs = mach-nix.buildPythonPackage {
python = "python27";
pname = "tahoe-lafs";
version = "1.16.0rc1";
inherit providers;
#inherit requirements providers;
# See https://github.com/DavHau/mach-nix/issues/190
requirementsExtra = ''
pyrsistent
foolscap == 0.13.1
configparser
eliot
'';
postPatch = ''
cat > src/allmydata/_version.py <<EOF
# This _version.py is generated by nix.
verstr = "$version"
__version__ = verstr
EOF
verstr = "$version"
__version__ = verstr
EOF
'';
src = pkgs.fetchFromGitHub {
owner = "fenn-cs";
repo = "tahoe-lafs";
rev = "f6a96ae3976ee21ad0376f7b6a22fc3d12110dce";
sha256 = "ZN2V5vH+VqPaBmQXXqyH+vUiqW1YNhz+7LsiNNhA/4g=";
src = pkgs.fetchFromGitHub {
owner = "fenn-cs";
repo = "tahoe-lafs";
rev = "f6a96ae3976ee21ad0376f7b6a22fc3d12110dce";
sha256 = "ZN2V5vH+VqPaBmQXXqyH+vUiqW1YNhz+7LsiNNhA/4g=";
};
};
}
)
......@@ -57,24 +77,16 @@ in
};
};
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; };
}
/**/
# (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 overridesPre _;
format = "setuptools";
# Record some settings here, so downstream nix files can consume them.
meta.mach-nix = { inherit python providers; };
}
/**/
......@@ -115,6 +115,7 @@ pyopenssl==21.0.0
# via
# foolscap
# twisted
tahoe-lafs
pyrsistent==0.16.1
# via
# eliot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment