/ default.nix
default.nix
 1  { system ? builtins.currentSystem
 2  , obelisk ? import ./.obelisk/impl {
 3      inherit system;
 4      iosSdkVersion = "13.2";
 5      reflex-platform-func = import ./dep/reflex-platform;
 6  
 7      # You must accept the Android Software Development Kit License Agreement at
 8      # https://developer.android.com/studio/terms in order to build Android apps.
 9      # Uncomment and set this to `true` to indicate your acceptance:
10      config.android_sdk.accept_license = true;
11  
12      # In order to use Let's Encrypt for HTTPS deployments you must accept
13      # their terms of service at https://letsencrypt.org/repository/.
14      # Uncomment and set this to `true` to indicate your acceptance:
15      # terms.security.acme.acceptTerms = false;
16    }
17  , androidIsRelease ? false
18  }:
19  with obelisk;
20  project ./. ({ pkgs, ... }: {
21    shellToolOverrides = self: super: {
22      haskell-language-server = pkgs.haskell.packages.ghc8107.haskell-language-server;
23      implicit-hie = pkgs.haskell.packages.ghc8107.implicit-hie;
24      hlint = pkgs.haskell.packages.ghc8107.hlint;
25    };
26  
27    overrides = self: super: {
28      # The version (v1.1.1) shipped with the reflex platform does not build. We
29      # use a more recent version.
30      lens-aeson = pkgs.haskell.lib.doJailbreak (self.callHackageDirect
31        {
32          pkg = "lens-aeson";
33          ver = "1.1.3";
34          sha256 = "W5/NtS8z3AnJ5fHfKStDiRAAfvwT6cz+qpzYP9oJj6A=";
35        }
36        { });
37      # The version (v0.2.2) shipped with the reflex platform does not build
38      # with ghc-js.
39      commonmark = pkgs.haskell.lib.doJailbreak (self.callHackageDirect
40        {
41          pkg = "commonmark";
42          ver = "0.1.1.4";
43          sha256 = "sha256-+pF0wrLCeRlPYzxX5b30KjpBTxRtu+K5ORlZtSVSf0k=";
44        }
45        { });
46    };
47  
48    staticFiles = import ./static { inherit pkgs; };
49  
50    android = {
51      applicationId = "org.jecaro.diverk";
52      displayName = "Diverk";
53      isRelease = androidIsRelease;
54      resources = reflex-platform.android.buildIcons {
55        src = ./assets/icon.png;
56      };
57      version = {
58        code = "5";
59        name = "1.5";
60      };
61    } // pkgs.lib.optionalAttrs androidIsRelease {
62      gradleTask = "bundleRelease";
63    };
64  
65    ios.bundleIdentifier = "org.jecaro.diverk";
66    ios.bundleName = "Diverk";
67  })