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

Switch to newer python-challenge-bypass-ristretto repo

And various associated changes necessary to keep the build working
parent 865abf2c
No related branches found
No related tags found
1 merge request!49Switch to newer python-challenge-bypass-ristretto repo
...@@ -72,17 +72,17 @@ jobs: ...@@ -72,17 +72,17 @@ jobs:
name: "Restore Nix Store Paths" name: "Restore Nix Store Paths"
keys: keys:
# Construct cache keys that allow sharing as long as nixpkgs and # 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 # If python-challenge-bypass-ristretto changes, we have to rebuild
# may as well throw away the part of the cache with the old build # it so we may as well throw away the part of the cache with the
# and make a new one with the new build so we don't have to # old build and make a new one with the new build so we don't have
# rebuild it *again* next time. # to rebuild it *again* next time.
# #
# If nixpkgs changes then potentially a lot of cached packages for # If nixpkgs changes then potentially a lot of cached packages for
# the base system will be invalidated so we may as well drop them # the base system will be invalidated so we may as well drop them
# and make a new cache with the new packages. # 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-{{ checksum "nixpkgs.rev" }}-
- paymentserver-nix-store-v2- - paymentserver-nix-store-v2-
...@@ -157,7 +157,7 @@ jobs: ...@@ -157,7 +157,7 @@ jobs:
- save_cache: - save_cache:
name: "Cache Nix Store Paths" 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: paths:
- "/nix" - "/nix"
......
...@@ -44,7 +44,7 @@ library ...@@ -44,7 +44,7 @@ library
, sqlite-simple , sqlite-simple
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wmissing-import-lists -Wunused-imports ghc-options: -Wmissing-import-lists -Wunused-imports
pkgconfig-depends: ristretto pkgconfig-depends: libchallenge_bypass_ristretto_ffi
executable PaymentServer-exe executable PaymentServer-exe
hs-source-dirs: app hs-source-dirs: app
......
...@@ -2,19 +2,19 @@ let ...@@ -2,19 +2,19 @@ let
buildDepError = pkg: buildDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency). The Haskell package set does not contain the package: ${pkg} (build dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix. If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
''; '';
sysDepError = pkg: sysDepError = pkg:
builtins.throw '' builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency). The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
''; '';
pkgConfDepError = pkg: pkgConfDepError = pkg:
builtins.throw '' builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency). The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found. You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
''; '';
exeDepError = pkg: exeDepError = pkg:
...@@ -24,16 +24,16 @@ let ...@@ -24,16 +24,16 @@ let
legacyExeDepError = pkg: legacyExeDepError = pkg:
builtins.throw '' builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency). The Haskell package set does not contain the package: ${pkg} (executable dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix. If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
''; '';
buildToolDepError = pkg: buildToolDepError = pkg:
builtins.throw '' builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency). Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency: If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found. You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency: If this is a Haskell dependency:
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix. If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
''; '';
...@@ -78,7 +78,7 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }: ...@@ -78,7 +78,7 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
(hsPkgs."sqlite-simple" or (buildDepError "sqlite-simple")) (hsPkgs."sqlite-simple" or (buildDepError "sqlite-simple"))
]; ];
pkgconfig = [ pkgconfig = [
(pkgconfPkgs."ristretto" or (pkgConfDepError "ristretto")) (pkgconfPkgs."libchallenge_bypass_ristretto_ffi" or (pkgConfDepError "libchallenge_bypass_ristretto_ffi"))
]; ];
}; };
exes = { exes = {
...@@ -97,4 +97,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }: ...@@ -97,4 +97,4 @@ in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
}; };
}; };
}; };
} // rec { src = (pkgs.lib).mkDefault ../.; } } // rec { src = (pkgs.lib).mkDefault ../.; }
\ No newline at end of file
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" { }
self: super: { 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" { }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment