Skip to content
Snippets Groups Projects
Commit a521e884 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

[wip] nix package thrashing, maybe junk

parent e3b293ac
No related branches found
No related tags found
1 merge request!51Upgrade Tahoe-LAFS on the storage servers
let let
# Define a Python packageOverride that puts our version of Twisted into # Define a Python packageOverride that puts our version of some Python
# python27Packages. # packages into python27Packages.
pythonTwistedOverride = python-self: python-super: { pythonPackageOverride = python-self: python-super: {
# Get our Twisted derivation. Pass in the old one so it can have pieces # Get our Twisted derivation. Pass in the old one so it can have pieces
# overridden. It needs to be passed in explicitly because callPackage is # overridden. It needs to be passed in explicitly because callPackage is
# specially crafted to always pull attributes from the fixed-point. That # specially crafted to always pull attributes from the fixed-point. That
...@@ -12,6 +12,10 @@ let ...@@ -12,6 +12,10 @@ let
twisted = python-self.callPackage ../pkgs/twisted.nix { twisted = python-self.callPackage ../pkgs/twisted.nix {
inherit (python-super) twisted; inherit (python-super) twisted;
}; };
tahoe-lafs = python-self.callPackage ../pkgs/tahoe-lafs.nix { };
zkapauthorizer = python-self.callPackage ../pkgs/zkapauthorizer.nix { };
}; };
in in
self: super: { self: super: {
...@@ -38,8 +42,8 @@ self: super: { ...@@ -38,8 +42,8 @@ self: super: {
python27 = super.python27.override (old: { python27 = super.python27.override (old: {
packageOverrides = packageOverrides =
if old ? packageOverrides then if old ? packageOverrides then
super.lib.composeExtensions old.packageOverrides pythonTwistedOverride super.lib.composeExtensions old.packageOverrides pythonPackageOverride
else else
pythonTwistedOverride; pythonPackageOverride;
}); });
} }
# Derive a brand new version of pkgs which has our overlays applied. This # Derive a brand new version of pkgs which has our overlays applied. This
# includes the ZKAPAuthorizer overlay which defines some Python overrides as # includes our definition of the `privatestorage` derivation, a Python
# well as our own which defines the `privatestorage` derivation. # environment with Tahoe-LAFS and ZKAPAuthorizer installed.
{ pkgs }: { pkgs }:
import pkgs.path { import pkgs.path {
overlays = [ overlays = [
# For some reason the order of these overlays matters. Maybe it has to do
# with our python27 override, I'm not sure. In the other order, we end up
# with two derivations of each of Twisted and treq which conflict with
# each other.
(import ./overlays.nix) (import ./overlays.nix)
# It might be nice to eventually remove this. ZKAPAuthorizer now
# self-applies this overlay without our help. We only still have it
# because it also defines tahoe-lafs which we want to use. We can't see
# tahoe-lafs from the self-applied overlay because that overlay is applied
# to ZKAPAuthorizer's nixpkgs, not to the one we're using.
(import ./zkap-overlay.nix)
]; ];
} }
let
pkgs = import <nixpkgs> {};
in
pkgs.fetchFromGitHub {
owner = "tahoe-lafs";
repo = "tahoe-lafs";
rev = "23e1223c94330741f5b1dda476c3aeb42c3a012f";
sha256 = "1zh37rvkiigciwadgrjvnq9519lap1c260v8593g65qrpc1zwjxz";
}
\ No newline at end of file
{ callPackage }:
let
tahoe-lafs-repo = import ./tahoe-lafs-repo.nix;
in
callPackage "${tahoe-lafs-repo}/nix" { }
{ callPackage }:
let
repo = import ./zkapauthorizer-repo.nix;
typing = callPackage "${repo}/typing.nix" { };
challenge-bypass-ristretto = callPackage "${repo}/python-challenge-bypass-ristretto.nix" { };
in
(callPackage "${repo}/zkapauthorizer.nix" {
inherit challenge-bypass-ristretto;
}).overrideAttrs (old: { doCheck = false; doInstallCheck = false; })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment