Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f670351
Update PyOpenSSL to the second-latest version
hacklschorsch Nov 5, 2024
aae9a87
Update pycddl 0.4.0 to 0.6.3
hacklschorsch Nov 5, 2024
99f3d4f
Update flake8-isort 6.0.0 -> 6.1.0, add missing pip to flake8-black
hacklschorsch Nov 5, 2024
cd2f361
Upgrade Python compose 1.4.8 -> 1.6.2
hacklschorsch Nov 5, 2024
ec45d04
Upgrade mypy-zope 0.3.11 -> 1.0.9
hacklschorsch Nov 5, 2024
cf1f181
Upgrade types-PyYAML 6.0.12.9 -> 6.0.12.20240917
hacklschorsch Nov 5, 2024
effca2d
Add Python 3.11 and 3.12 to exposed packages
hacklschorsch Nov 5, 2024
0405dc8
Add newer Python versions to CI
hacklschorsch Nov 5, 2024
77e2878
Vendor collections-extended and link to a version that works with Pyt…
hacklschorsch Nov 5, 2024
b8321a1
Vendor magic-wormhole-transit-relay: Only the current master tip is P…
hacklschorsch Nov 5, 2024
cdca045
Vendor magic-wormhole-mailbox-server: Only the current master tip is …
hacklschorsch Nov 5, 2024
ff696a5
huh
hacklschorsch Nov 5, 2024
2aaa83d
vendor eliot because of their broken versioneer
hacklschorsch Nov 5, 2024
07b6588
Upgrade to eliot 1.15 for Python 3.12
hacklschorsch Nov 5, 2024
dd09c8a
Fetch new magic-wormhole-transit-relay nix expression
hacklschorsch Nov 6, 2024
363398c
magic-wormhole breaks with latest -transit-relay, so update it, but t…
hacklschorsch Nov 6, 2024
6c202a6
We use nixpkg's hypothesis now
hacklschorsch Nov 6, 2024
ecc470d
recent tahoe-lafs requires pip and orjson to install
hacklschorsch Nov 6, 2024
d19e68b
Vendor eliot-tree to get latest version with Python 3.12 fixes
hacklschorsch Nov 6, 2024
0f94894
Merge branch 'main' into update-2024-11
hacklschorsch Nov 7, 2024
230a21f
Update nix docker image for circleCI
hacklschorsch Nov 7, 2024
21aec55
Remove ipython - it's getting in the way of our Python39 build
hacklschorsch Nov 8, 2024
5baad6d
Don't run Twisted runtimeDeps check: It fails to find zope-interface …
hacklschorsch Nov 8, 2024
df68d0d
CI gets a different fixed-output hash for magic-wormhole-transit-relay?
hacklschorsch Nov 8, 2024
a9b5ca9
WIP Try-fix latest Tahoe-LAFS (dev) - 1.20. release still broken
hacklschorsch May 15, 2025
732ba49
WIP Got tests running with latest Tahoe-LAFS
hacklschorsch May 15, 2025
41756ab
Make tahoe-lafs 1.20 work too
hacklschorsch May 15, 2025
97c8ef5
Remove obsolete package overrides
hacklschorsch May 15, 2025
7958791
Use eliot-tree from nixpkgs
hacklschorsch May 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ aliases:

- nix_docker: &NIX_DOCKER
# Run in a highly Nix-capable environment.
- image: "nixos/nix:2.15.0"
- image: "nixos/nix:2.18.9"

- nix_environ: &NIX_ENVIRON
# Let us use features marked "experimental". For example, most/all of
Expand Down Expand Up @@ -515,6 +515,8 @@ workflows:
py-version:
- "39"
- "310"
- "311"
- "312"
tahoe-lafs:
- "1_18_0"
# This is usually not master@HEAD because it is still pinned to
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "A Tahoe-LAFS storage-system plugin which authorizes storage operations based on privacy-respecting tokens.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
challenge-bypass-ristretto.url = github:LeastAuthority/python-challenge-bypass-ristretto;
challenge-bypass-ristretto.inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -31,7 +31,7 @@

# The names of the nixpkgs Python derivations for which we will expose
# packages.
pyVersions = [ "python310" "python39" ];
pyVersions = [ "python312" "python311" "python310" "python39" ];

# All of the versions our Tahoe-LAFS dependency for which we will expose
# packages.
Expand Down
44 changes: 44 additions & 0 deletions nix/collections-extended.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hypothesis,
poetry-core,
pytestCheckHook,
pythonOlder,
pythonAtLeast,
}:

buildPythonPackage rec {
pname = "collections-extended";
version = "2.0.2.post1";
format = "pyproject";

# https://github.com/mlenzen/collections-extended/issues/198
# My own running the test suggest Python 3.12 is still fine.
disabled = pythonOlder "3.6" || pythonAtLeast "3.13";

src = fetchFromGitHub {
owner = "mlenzen";
repo = pname;
# This version includes our hero JP's patches for Python 3.11.
rev = "8b93390636d58d28012b8e9d22334ee64ca37d73";
hash = "sha256-e7RCpNsqyS1d3q0E+uaE4UOEQziueYsRkKEvy3gCHt0=";
};

nativeBuildInputs = [ poetry-core ];

nativeCheckInputs = [
hypothesis
pytestCheckHook
];

pythonImportsCheck = [ "collections_extended" ];

meta = with lib; {
description = "Extra Python Collections - bags (multisets), setlists (unique list/indexed set), RangeMap and IndexedDict";
homepage = "https://github.com/mlenzen/collections-extended";
license = licenses.asl20;
maintainers = with maintainers; [ exarkun ];
};
}
4 changes: 2 additions & 2 deletions nix/compose.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildPythonPackage rec {
pname = "compose";
version = "1.4.8";
version = "1.6.2";

src = fetchPypi {
inherit pname version;
sha256 = "sha256-mpRabfC4LE6xYlHmQbHb1yXxLDtH5idwN4GbUnCPGTo=";
sha256 = "sha256-yUP6goTByziSklOIhi4gPJiISE5M4/1RcVBnaWkNi00=";
};

meta = with lib; {
Expand Down
22 changes: 0 additions & 22 deletions nix/flake8-black.nix

This file was deleted.

18 changes: 0 additions & 18 deletions nix/flake8-isort.nix

This file was deleted.

11 changes: 0 additions & 11 deletions nix/hypothesis.nix

This file was deleted.

9 changes: 0 additions & 9 deletions nix/klein.nix

This file was deleted.

30 changes: 7 additions & 23 deletions nix/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ rec {
# our override recursively to the package set until the return value is
# the same as the input.
packageOverrides = self: super: {
pycddl = self.callPackage ./pycddl.nix {};

# The foolscap test suite has one failing test when run against the
# new version of Twisted, so disable the test suite for now. XXX
# Maybe we could just disable the one failing test,
Expand All @@ -51,15 +49,6 @@ rec {
compose = self.callPackage ./compose.nix {};
tahoe-capabilities = self.callPackage ./tahoe-capabilities.nix {};

pyopenssl = self.callPackage ./pyopenssl.nix {
inherit (super) pyopenssl;
};

# The klein test suite is a little broken so ... don't run it.
klein = dontCheck (self.callPackage ./klein.nix {
inherit (super) klein;
});

# Disable some expensive dependencies that we don't care about.
black = dontCheck (super.black.override {
aiohttp = null;
Expand All @@ -69,6 +58,9 @@ rec {
# tokenize-rt = null;
});

# Something wants ipython - it breaks Python39 though, so we turn it off.
ipython = null;

tqdm = dontCheck super.tqdm;

isort = dontCheck super.isort;
Expand All @@ -79,25 +71,17 @@ rec {
postPatch = tahoe-lafs.buildArgs.postPatch or null;
};

flake8-isort = self.callPackage ./flake8-isort.nix {};
flake8-black = self.callPackage ./flake8-black.nix {};
mypy-zope = self.callPackage ./mypy-zope.nix {};
types-PyYAML = self.callPackage ./types-pyyaml.nix {};

# Hypothesis 6.54-ish has a bug that causes our test suite to fail.
# Get a newer one.
hypothesis = self.callPackage ./hypothesis.nix {
inherit (super) hypothesis;
};
# collections-extended isn't maintained anymore.
collections-extended = self.callPackage ./collections-extended.nix {};
};
}); in with python.pkgs;
buildPythonPackage rec {
inherit src;
pname = "ZKAPAuthorizer";
# Don't forget to bump the version number in
# src/_zkapauthorizer/__init__.py too.
version = "2022.8.21";
format = "setuptools";
version = "2025.5.15";
# format = "setuptools";

# Should this be nativeCheckInputs? It might matter for
# cross-compilation. It's not clear cross-compilation works for Python
Expand Down
19 changes: 0 additions & 19 deletions nix/mypy-zope.nix

This file was deleted.

22 changes: 0 additions & 22 deletions nix/pycddl.nix

This file was deleted.

10 changes: 0 additions & 10 deletions nix/pyopenssl.nix

This file was deleted.

21 changes: 13 additions & 8 deletions nix/tahoe-lafs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ buildPythonPackage {
pname = "tahoe-lafs";
version = tahoe-lafs-version;
src = tahoe-lafs-src;
pyproject = true;

postPatch =
(if postPatch == null then "" else postPatch) +
# This < is really trying to be a !=. We provide a new-enough Autobahn
# that it actually works, so remove the constraint from the Python metadata.
''
sed -i -e "s/autobahn < 22.4.1/autobahn/" setup.py
'';
# postPatch =
# (if postPatch == null then "" else postPatch) +
# # This < is really trying to be a !=. We provide a new-enough Autobahn
# # that it actually works, so remove the constraint from the Python metadata.
# ''
# sed -i -e "s/autobahn < 22.4.1/autobahn/" setup.py
# '';

dontUseSetuptoolsCheck = true;
# dontUseSetuptoolsCheck = true;
propagatedBuildInputs = with pythonPackages; [
zfec
zope_interface
Expand All @@ -30,6 +31,8 @@ buildPythonPackage {
netifaces
pyutil
collections-extended
hatchling
hatch-vcs
klein
werkzeug
treq
Expand All @@ -42,5 +45,7 @@ buildPythonPackage {
appdirs
bcrypt
aniso8601
pip
orjson
];
}
Loading