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

1.16 support v1

parent e01b8e7d
No related branches found
No related tags found
1 merge request!239Switch to using mach-nix for python packaging.
......@@ -4,12 +4,9 @@ in
{ pkgs ? import sources.release2015 {}
, pypiData ? sources.pypi-deps-db
, mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
,
, tahoe-lafs ? "1.14.0"
}:
mach-nix.buildPythonApplication rec {
python = "python27";
name = "zero-knowledge-access-pass-authorizer";
src = ./.;
let
providers = {
_default = "sdist,nixpkgs,wheel";
# not packaged in nixpkgs at all, we can use the binary wheel from
......@@ -26,6 +23,48 @@ in
urllib3 = "wheel";
zipp = "wheel";
};
tahoe-versions = {
"1.14.0" = {
requirements = builtins.readFile ./requirements/base.txt;
propagatedBuildInputs = [];
};
"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 {
......@@ -35,7 +74,7 @@ in
)
];
format = "setuptools";
requirements = builtins.readFile ./requirements/base.txt;
# Record some settings here, so downstream nix files can consume them.
meta.mach-nix = { inherit python providers; };
}
/**/
......@@ -147,8 +147,6 @@ six==1.16.0
# txaio
spake2==0.8
# via magic-wormhole
https://github.com/fenn-cs/tahoe-lafs/archive/f6a96ae3976ee21ad0376f7b6a22fc3d12110dce.tar.gz
# via -r requirements/base-1.16.in
tqdm==4.62.3
# via magic-wormhole
treq==21.1.0
......@@ -179,9 +177,3 @@ zope.interface==5.4.0
# tahoe-lafs
# twisted
# txtorcon
# The following packages are considered to be unsafe in a requirements file:
setuptools==44.1.1
# via
# tahoe-lafs
# zope.interface
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; },
zkapauthorizer ? import ./new.nix { inherit pkgs pypiData mach-nix; },
ci-reports ? false,
hypothesisProfile ? null,
collectCoverage ? false,
testSuite ? null,
trialArgs ? null,
{ pkgs ? import sources.release2015 {}
, pypiData ? sources.pypi-deps-db
, mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
, tahoe-lafs ? "1.14.0"
, zkapauthorizer ? import ./new.nix { inherit pkgs pypiData mach-nix tahoe-lafs; }
, ci-reports ? false
, hypothesisProfile ? null
, collectCoverage ? false
, testSuite ? null
, trialArgs ? null
,
}:
let
lib = pkgs.lib;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment