From 956bfa4a0e03eb20d200d3a0c6b90767ad085490 Mon Sep 17 00:00:00 2001 From: Cale Gibbard Date: Wed, 8 Feb 2023 10:23:40 -0500 Subject: [PATCH] Some slight tidying of comments. --- default.nix | 11 ++++++++--- nixpkgs-overlay.nix | 9 ++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/default.nix b/default.nix index 335214d..b12eabc 100644 --- a/default.nix +++ b/default.nix @@ -3,8 +3,10 @@ , obelisk ? import ./.obelisk/impl { inherit system; iosSdkVersion = "13.2"; - # Here we insert our own nixpkgs overlays. Since it's a bit awkward, a future version of Obelisk will make this more straightforward, but for now, - # the way to do this is by modifying the reflex-platform function to modify its nixpkgsOverlays argument. + # Here we insert our own nixpkgs overlays. Since it's a bit awkward, a future version of Obelisk will make + # this more straightforward, but for now, the way to do this is by modifying the reflex-platform function + # to modify its nixpkgsOverlays argument. Be sure to also have a look at ./nixpkgs-overlay.nix for the botan2 + # overlay. reflex-platform-func = (args: import (nix-thunk.thunkSource ./.obelisk/impl + "/dep/reflex-platform") (args // { nixpkgsOverlays = args.nixpkgsOverlays ++ [(import ./nixpkgs-overlay.nix { inherit nix-thunk; })]; } ) ); @@ -27,7 +29,10 @@ project ./. ({ pkgs, hackGet, ... }: { ios.bundleName = "Obelisk Minimal Example"; overrides = self: super: with pkgs.haskell.lib; { - # Here, we get the tahoe-chk package from the chk.hs thunk, and use callCabal2nix to get a nix derivation to build it. + # Here, we get the tahoe-chk package from the chk.hs thunk, + # and use callCabal2nix to get a nix derivation to build it. + # See the comment in ./nixpkgs-overlay.nix for a description + # of how to interact with nix thunks. tahoe-chk = self.callCabal2nix "tahoe-chk" (nix-thunk.thunkSource ./dep/chkhs) {}; # We also ended up needing an override of the base32 library, which we obtain from Hackage. base32 = self.callHackageDirect { diff --git a/nixpkgs-overlay.nix b/nixpkgs-overlay.nix index d7d92b2..ede8361 100644 --- a/nixpkgs-overlay.nix +++ b/nixpkgs-overlay.nix @@ -35,10 +35,13 @@ sha256 = "sha256:1prd9b1xx8c0sfwnyzkspplh30m613j42l1k789s521f4kv4c2z2"; }); # This has the top level of the flake... - challenge-bypass-ristretto-ffi-flake = (self.flake-compat { src = nix-thunk.thunkSource ./dep/python-challenge-bypass-ristretto ; }).defaultNix; + challenge-bypass-ristretto-ffi-flake = + (self.flake-compat { src = nix-thunk.thunkSource ./dep/python-challenge-bypass-ristretto ; }).defaultNix; # ... from which we can extract whatever packages we need. - challenge-bypass-ristretto-ffi = challenge-bypass-ristretto-ffi-flake.packages."${builtins.currentSystem}".libchallenge_bypass_ristretto_ffi; - challenge-bypass-ristretto-ffi-android = challenge-bypass-ristretto-ffi-flake.legacyPackages."${builtins.currentSystem}".pkgsCross.aarch64-android.libchallenge_bypass_ristretto_ffi; + challenge-bypass-ristretto-ffi = + challenge-bypass-ristretto-ffi-flake.packages."${builtins.currentSystem}".libchallenge_bypass_ristretto_ffi; + challenge-bypass-ristretto-ffi-android = + challenge-bypass-ristretto-ffi-flake.legacyPackages."${builtins.currentSystem}".pkgsCross.aarch64-android.libchallenge_bypass_ristretto_ffi; # We can branch on the target platform to choose between the different architecture libraries from the flake. Modifying the flake might be easier. libchallenge_bypass_ristretto_ffi = if self.stdenv.targetPlatform.isAndroid then challenge-bypass-ristretto-ffi-flake.legacyPackages.${builtins.currentSystem}.pkgsCross.aarch64-android.libchallenge_bypass_ristretto_ffi