summaryrefslogtreecommitdiff
path: root/nix/haskell-overlay.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-27 09:20:59 -0700
committerBen Sima <ben@bsima.me>2020-06-27 09:20:59 -0700
commit14e3c6a61f7727e994c4e1cf2568a3e606f84648 (patch)
tree6322dcfecf06bad2be8f85d560fd81e5206262e2 /nix/haskell-overlay.nix
parent1ad6b3248f788cc178162bac5919c0b0fd6f9d39 (diff)
hero: implement the basics of user logins
There's also a lot of refactoring/renaming in here, so the diff is really messy. The overall problem is that I've only ever added code, I've never gone back and reorganized/rearchitected stuff. So adding even small features is becoming an enormous effort. Anyway, this adds the basics of user auth. Next I need to add the auth checks for every route that needs it, and make sure everything is back to working correctly.
Diffstat (limited to 'nix/haskell-overlay.nix')
-rw-r--r--nix/haskell-overlay.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nix/haskell-overlay.nix b/nix/haskell-overlay.nix
index 1afea87..f37d602 100644
--- a/nix/haskell-overlay.nix
+++ b/nix/haskell-overlay.nix
@@ -1,20 +1,27 @@
_: pkgs:
let
- cabalBuilder = self: name: self.callCabal2nix name pkgs.sources.${name} {};
+ simpleCabalBuilder = self: name:
+ self.callCabal2nix name pkgs.sources.${name} {};
+ buildCabal = self: name: subdir:
+ if isNull subdir then
+ self.callCabal2nix name pkgs.sources.${name} {}
+ else
+ self.callCabal2nix name (pkgs.sources.${name} + "/${subdir}") {};
in
{
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
ghc865 = pkgs.haskell.packages.ghc865.override (old: {
overrides = with pkgs.pkgs.haskell.lib; self: super:
- pkgs.overridePinnedDeps (cabalBuilder self) // {
+ pkgs.overridePinnedDeps (simpleCabalBuilder self) // {
+ servant-auth = buildCabal self "servant-auth" "servant-auth";
wai-middleware-metrics = dontCheck super.wai-middleware-metrics;
};
});
ghcjs = pkgs.haskell.packages.ghcjs.override (old: {
overrides = with pkgs.haskell.lib; self: super:
- pkgs.overridePinnedDeps (cabalBuilder self) // {
+ pkgs.overridePinnedDeps (simpleCabalBuilder self) // {
QuickCheck = dontCheck super.QuickCheck;
base-compat-batteries = dontCheck super.http-types;
clay = dontCheck super.clay;