From 779a9204b53291598786fe468959d04597cd2d13 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Thu, 8 Jul 2021 09:46:47 -0400 Subject: [PATCH] attempt to supply libchallenge_bypass_ristretto_ffi, to no effect --- default.nix | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/default.nix b/default.nix index 6995a80..bf008fd 100644 --- a/default.nix +++ b/default.nix @@ -1,16 +1,18 @@ let + moreOverlays = [ (import ./oldnix/overlay.nix) ]; + # Read in the Niv sources - sources = import ./nix/sources.nix {}; + sources = import ./nix/sources.nix { }; # If ./nix/sources.nix file is not found run: # niv init # niv add input-output-hk/haskell.nix -n haskellNix # Fetch the haskell.nix commit we have pinned with Niv - haskellNix = import sources.haskellNix {}; + haskellNix = import sources.haskellNix { }; # If haskellNix is not found run: # niv add input-output-hk/haskell.nix -n haskellNix - libchallenge_bypass_ristretto_ffi = pkgs.callPackage ./oldnix/challenge-bypass-ristretto.nix { }; + allOverlays = moreOverlays ++ haskellNix.nixpkgsArgs.overlays; # Import nixpkgs and pass the haskell.nix provided nixpkgsArgs pkgs = import @@ -20,22 +22,30 @@ let haskellNix.sources.nixpkgs-2009 # These arguments passed to nixpkgs, include some patches and also # the haskell.nix functionality itself as an overlay. - (haskellNix.nixpkgsArgs // { - overlays = haskellNix.nixpkgsArgs.overlays ++ [ - (self: super: { inherit libchallenge_bypass_ristretto_ffi; }) - ]; - }); + (haskellNix.nixpkgsArgs // { overlays = allOverlays; }); - -in pkgs.haskell-nix.project { - # 'cleanGit' cleans a source directory based on the files known by git - src = pkgs.haskell-nix.haskellLib.cleanGit { - name = "PaymentServer"; - src = ./.; + hsPkgs = pkgs.haskell-nix.project { + # 'cleanGit' cleans a source directory based on the files known by git + src = pkgs.haskell-nix.haskellLib.cleanGit { + name = "PaymentServer"; + src = ./.; + }; + modules = [{ + packages.PaymentServer.components.library.libs = [ + pkgs.pkg-config + pkgs.libchallenge_bypass_ristretto_ffi + ]; + }]; }; - modules = [{ - packages.PaymentServer.components.library.libs = pkgs.lib.mkForce [ - libchallenge_bypass_ristretto_ffi - ]; - }]; -} +in + hsPkgs + # pkgs.lib.recursiveUpdate hsPkgs { + # PaymentServer.setup.propagatedNativeBuildInputs = [ + # pkgs.pkg-config + # pkgs.libchallenge_bypass_ristretto_ffi + # ]; + # PaymentServer.components.library.propagatedNativeBuildInputs = [ + # pkgs.pkg-config + # pkgs.libchallenge_bypass_ristretto_ffi + # ]; + # } -- GitLab