Skip to content
Snippets Groups Projects
Unverified Commit d6ad0042 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone Committed by GitHub
Browse files

Merge pull request #49 from PrivateStorageio/47.upgrade-challenge-bypass-ristretto.2

Switch to newer python-challenge-bypass-ristretto repo
parents 865abf2c ba349cf9
No related branches found
No related tags found
No related merge requests found
......@@ -72,17 +72,17 @@ jobs:
name: "Restore Nix Store Paths"
keys:
# Construct cache keys that allow sharing as long as nixpkgs and
# the Ristretto library are the same.
# the python-challenge-bypass-ristretto library are the same.
#
# If the Ristretto library changes, we have to rebuild it so we
# may as well throw away the part of the cache with the old build
# and make a new one with the new build so we don't have to
# rebuild it *again* next time.
# If python-challenge-bypass-ristretto changes, we have to rebuild
# it so we may as well throw away the part of the cache with the
# old build and make a new one with the new build so we don't have
# to rebuild it *again* next time.
#
# If nixpkgs changes then potentially a lot of cached packages for
# the base system will be invalidated so we may as well drop them
# and make a new cache with the new packages.
- paymentserver-nix-store-v2-{{ checksum "nixpkgs.rev" }}-{{ checksum "ristretto.nix" }}
- paymentserver-nix-store-v2-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
- paymentserver-nix-store-v2-{{ checksum "nixpkgs.rev" }}-
- paymentserver-nix-store-v2-
......@@ -157,7 +157,7 @@ jobs:
- save_cache:
name: "Cache Nix Store Paths"
key: paymentserver-nix-store-v2-{{ checksum "nixpkgs.rev" }}-{{ checksum "ristretto.nix" }}
key: paymentserver-nix-store-v2-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
paths:
- "/nix"
......
......@@ -44,7 +44,7 @@ library
, sqlite-simple
default-language: Haskell2010
ghc-options: -Wmissing-import-lists -Wunused-imports
pkgconfig-depends: ristretto
pkgconfig-depends: libchallenge_bypass_ristretto_ffi
executable PaymentServer-exe
hs-source-dirs: app
......
......@@ -78,7 +78,7 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
(hsPkgs."sqlite-simple" or (buildDepError "sqlite-simple"))
];
pkgconfig = [
(pkgconfPkgs."ristretto" or (pkgConfDepError "ristretto"))
(pkgconfPkgs."libchallenge_bypass_ristretto_ffi" or (pkgConfDepError "libchallenge_bypass_ristretto_ffi"))
];
};
exes = {
......
let
pkgs = import <nixpkgs> {};
in
pkgs.fetchFromGitHub {
owner = "LeastAuthority";
repo = "python-challenge-bypass-ristretto";
rev = "v2020.04.03rc1";
sha256 = "03iqww9h7ff0pdi3mgg912a9s9yd8xbm4cx7iznv94611vxrcdzs";
}
{ fetchFromGitHub, callPackage }:
let
src = import ./challenge-bypass-ristretto-repo.nix;
in
callPackage "${src}/challenge-bypass-ristretto.nix" { }
{ pkgs ? import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; } }:
{ pkgs ? import <nixpkgs> { } }:
let
# Get our overlay in place regardless of whether a value is passed for pkgs.
# The build fails without it and it's unreasonable to expect our caller to
# know to apply it.
nixpkgs = import pkgs.path { overlays = [ (import ./overlay.nix) ]; };
# Pin a particular version of haskell.nix. The particular version isn't
# special. It's just recent at the time this expression was written and it
# is known to work with PaymentServer. It could be bumped if necessary but
# this would probably only happen as a result of bumping the resolver in
# stack.yaml.
haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/0cb32e695d7014908fb01fd7e3d225ea33dbdc98.tar.gz) { inherit pkgs; };
haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/0cb32e695d7014908fb01fd7e3d225ea33dbdc98.tar.gz) { pkgs = nixpkgs; };
pkgSet = haskell.mkStackPkgSet {
stack-pkgs = import ./pkgs.nix;
......
self: super: {
ristretto = super.callPackage ./ristretto.nix { };
libchallenge_bypass_ristretto_ffi = super.callPackage ./challenge-bypass-ristretto.nix { };
}
{ fetchFromGitHub, callPackage }:
let
src = import ./privacypass-repo.nix { inherit fetchFromGitHub; };
in
callPackage "${src}/ristretto.nix" { }
{ fetchFromGitHub, callPackage }:
let
src = fetchFromGitHub {
owner = "LeastAuthority";
repo = "privacypass";
rev = "45855401e163f8e622bd93a5c5bce13de8c8510a";
sha256 = "15wv8vas6x8cdicylp0m632c916p7qxq1k4lnchr8c92lldp0rv7";
};
in
callPackage "${src}/ristretto.nix" { }
......@@ -4,7 +4,7 @@
let
pkgs = import <nixpkgs> { };
# Get our Ristretto bindings.
ristretto = pkgs.callPackage ./ristretto.nix { };
libchallenge_bypass_ristretto = pkgs.callPackage ./nix/challenge-bypass-ristretto.nix { };
in
# This is what you're supposed to call in a stack shell-file. I don't
# *really* know what it does but I know it works...
......@@ -13,5 +13,5 @@ in
name = "PrivacyPass";
# zlib is a common dependency of many of our dependencies. and we put our
# ristretto library in as well.
buildInputs = [ pkgs.zlib ristretto ];
buildInputs = [ pkgs.zlib libchallenge_bypass_ristretto ];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment