PrivateStorageio / ZKAPAuthorizer

a Tahoe-LAFS storage-system plugin which authorizes storage operations based on privacy-respecting tokens
10 stars 7 forks source link

Supply all of the Nix-related functionality through the flake #424

Closed exarkun closed 2 years ago

exarkun commented 2 years ago

This gathers the functionality from the various Nix source files - default.nix, tests.nix, wheel.nix, shell.nix, sources.nix, twine.nix - and exposes it all through a Nix flake.

niv-based workflow is replaced with nix flake-based workflow.

codecov[bot] commented 2 years ago

Codecov Report

Merging #424 (48ab459) into main (7f1ee28) will decrease coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #424      +/-   ##
==========================================
- Coverage   96.35%   96.34%   -0.02%     
==========================================
  Files          63       63              
  Lines        7526     7526              
  Branches     1012     1012              
==========================================
- Hits         7252     7251       -1     
- Misses        203      204       +1     
  Partials       71       71              
Impacted Files Coverage Δ
src/_zkapauthorizer/tests/test_storage_protocol.py 97.18% <0.00%> (-0.81%) :arrow_down:
src/_zkapauthorizer/tests/test_client_resource.py 98.22% <0.00%> (+0.22%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

hacklschorsch commented 2 years ago

nix --experimental-features 'nix-command flakes' build .#zkapauthorizer-python310-tahoe_dev works ending with
building '/nix/store/2wmiar17qp9j96pw0sml39lgjxzjs2m2-python3.10-zero-knowledge-access-pass-authorizer-2022.6.29.drv'...

nix --experimental-features 'nix-command flakes' build .#wheel runs OK ending in
building '/nix/store/h1djjcgjjca0m78wkahlz8pflgpc2chm-python3.10-zero-knowledge-access-pass-authorizer-2022.6.29-wheel.drv'...

nix --experimental-features 'nix-command flakes' build errors out with
error: flake 'git+file:///home/flo/Repositories/ZKAPAuthorizer' does not provide attribute 'packages.x86_64-linux.defaultPackage.x86_64-linux', 'legacyPackages.x86_64-linux.defaultPackage.x86_64-linux' or 'defaultPackage.x86_64-linux' But that might be expected?

I don't know anything about flakes so far. Stuff that is general knowledge about flakes shouldn't add up in a readme, but maybe the most common and/or useful build targets might make sense to have in the readme or contributing?

hacklschorsch commented 2 years ago

I wanted to say our discussion in Open Pairing obsoletes my above comment, then clicked the wrong button. Sorry!