Commit 1b3f7ba0 authored by Christopher League's avatar Christopher League 🖥

Change build setup on nix; don't need stackage

parent 93e4c002
Pipeline #830 passed with stage
in 59 minutes and 5 seconds
{ mkDerivation, aeson, base, blaze-markup, bytestring { mkDerivation, aeson, base, blaze-markup, bytestring
, case-insensitive, classy-prelude, classy-prelude-yesod , case-insensitive, classy-prelude, classy-prelude-yesod
, containers, data-default, directory, exceptions, fast-logger , containers, data-default, directory, exceptions, fast-logger
, file-embed, foreign-store, gogol, gogol-apps-calendar , file-embed, foreign-store, gogol, gogol-apps-calendar, hjsmin
, hjsmin, hpack, hspec, http-client-tls, http-conduit, http-types , hpack, hspec, http-client-tls, http-conduit, http-types, lens
, lens, monad-control, monad-logger, shakespeare, sorted-list , monad-control, monad-logger, shakespeare, sorted-list, stdenv
, stdenv, template-haskell, text, time, transformers, tz , template-haskell, text, time, transformers, tz
, unordered-containers, vector, wai, wai-extra, wai-logger, warp , unordered-containers, vector, wai, wai-extra, wai-logger, warp
, yaml, yesod, yesod-core, yesod-form, yesod-static, yesod-test , yaml, yesod, yesod-core, yesod-form, yesod-static, yesod-test
}: }:
...@@ -17,35 +17,33 @@ mkDerivation { ...@@ -17,35 +17,33 @@ mkDerivation {
libraryHaskellDepends = [ libraryHaskellDepends = [
aeson base blaze-markup bytestring case-insensitive classy-prelude aeson base blaze-markup bytestring case-insensitive classy-prelude
classy-prelude-yesod containers data-default directory exceptions classy-prelude-yesod containers data-default directory exceptions
fast-logger file-embed foreign-store gogol fast-logger file-embed foreign-store gogol gogol-apps-calendar
gogol-apps-calendar hjsmin http-client-tls http-conduit http-types hjsmin http-client-tls http-conduit http-types lens monad-control
lens monad-control monad-logger shakespeare sorted-list monad-logger shakespeare sorted-list template-haskell text time
template-haskell text time transformers tz unordered-containers transformers tz unordered-containers vector wai wai-extra
vector wai wai-extra wai-logger warp yaml yesod yesod-core wai-logger warp yaml yesod yesod-core yesod-form yesod-static
yesod-form yesod-static
]; ];
libraryToolDepends = [ hpack ]; libraryToolDepends = [ hpack ];
executableHaskellDepends = [ executableHaskellDepends = [
aeson base blaze-markup bytestring case-insensitive classy-prelude aeson base blaze-markup bytestring case-insensitive classy-prelude
classy-prelude-yesod containers data-default directory exceptions classy-prelude-yesod containers data-default directory exceptions
fast-logger file-embed foreign-store gogol fast-logger file-embed foreign-store gogol gogol-apps-calendar
gogol-apps-calendar hjsmin http-client-tls http-conduit http-types hjsmin http-client-tls http-conduit http-types lens monad-control
lens monad-control monad-logger shakespeare sorted-list monad-logger shakespeare sorted-list template-haskell text time
template-haskell text time transformers tz unordered-containers transformers tz unordered-containers vector wai wai-extra
vector wai wai-extra wai-logger warp yaml yesod yesod-core wai-logger warp yaml yesod yesod-core yesod-form yesod-static
yesod-form yesod-static
]; ];
testHaskellDepends = [ testHaskellDepends = [
aeson base blaze-markup bytestring case-insensitive classy-prelude aeson base blaze-markup bytestring case-insensitive classy-prelude
classy-prelude-yesod containers data-default directory exceptions classy-prelude-yesod containers data-default directory exceptions
fast-logger file-embed foreign-store gogol fast-logger file-embed foreign-store gogol gogol-apps-calendar
gogol-apps-calendar hjsmin hspec http-client-tls http-conduit hjsmin hspec http-client-tls http-conduit http-types lens
http-types lens monad-control monad-logger shakespeare sorted-list monad-control monad-logger shakespeare sorted-list template-haskell
template-haskell text time transformers tz unordered-containers text time transformers tz unordered-containers vector wai wai-extra
vector wai wai-extra wai-logger warp yaml yesod yesod-core wai-logger warp yaml yesod yesod-core yesod-form yesod-static
yesod-form yesod-static yesod-test yesod-test
]; ];
preConfigure = "hpack"; preConfigure = "hpack";
license = stdenv.lib.licenses.unfree; license = "unknown";
hydraPlatforms = stdenv.lib.platforms.none; hydraPlatforms = stdenv.lib.platforms.none;
} }
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
with haskell.lib;
let let
stackageSrc = builtins.fetchTarball { ignore = [
url = https://github.com/typeable/nixpkgs-stackage/archive/0c2597f1d300ea4d124c2078777d1bb598d6995f.tar.gz; "dist"
sha256 = "1imd6l6kc8ncw1jc7z9aj6spmm0a21l64ig45xfi0640df7v9x2r"; "dist-newstyle"
}; "cabal.project.local"
];
nixpkgs = import <nixpkgs> { keep = name: type:
overlays = [ (import stackageSrc) ]; lib.cleanSourceFilter name type
}; && ! (lib.elem (baseNameOf name) ignore)
&& ! (lib.hasPrefix ".ghc.environment" (baseNameOf name))
inherit (nixpkgs) pkgs lib; && ! (lib.hasPrefix "autogen-" (baseNameOf name));
# This requires the nixpkgs-stackage overlay.
hpkgs = pkgs.haskell.packages.stackage.lts-1110;
hlib = pkgs.haskell.lib;
# The gogol package is not part of stackage LTS, and it's a bit
# tricky to build. Best results so far are with LTS specified above
# and the gogol revision specified here.
gogol-src = pkgs.fetchgit {
url = "https://github.com/brendanhay/gogol.git";
rev = "344c9f781560e1ed8395b17e370ba1b085f2edc2";
sha256 = "0f48mh7f2ifk3b7rjwgn9cwmi6845xv9zvs07khycbk70959pk1n";
};
gogol-core =
{ mkDerivation, aeson, attoparsec, base, bifunctors, bytestring
, case-insensitive, conduit, dlist, exceptions, hashable
, http-api-data, http-client, http-media, http-types, lens
, resourcet, scientific, servant, stdenv, tasty, text, time
, unordered-containers
}:
mkDerivation {
pname = "gogol-core";
version = "0.3.0";
src = gogol-src;
preCompileBuildDriver = "cd core";
libraryHaskellDepends = [
aeson attoparsec base bifunctors bytestring case-insensitive
conduit dlist exceptions hashable http-api-data http-client
http-media http-types lens resourcet scientific servant text time
unordered-containers
];
testHaskellDepends = [ base tasty ];
homepage = "https://github.com/brendanhay/gogol";
description = "Core data types and functionality for Gogol libraries";
license = "unknown";
};
gogol =
{ mkDerivation, aeson, base, bytestring, case-insensitive, conduit
, conduit-extra, cryptonite, directory, exceptions, filepath
, gogol-core, http-client, http-conduit, http-media, http-types
, lens, memory, mime-types, mtl, resourcet, stdenv, text, time
, transformers, unliftio-core, unordered-containers, x509
, x509-store
}:
mkDerivation {
pname = "gogol";
version = "0.3.0";
src = gogol-src;
preCompileBuildDriver = "cd gogol";
libraryHaskellDepends = [
aeson base bytestring case-insensitive conduit conduit-extra
cryptonite directory exceptions filepath gogol-core http-client
http-conduit http-media http-types lens memory mime-types mtl
resourcet text time transformers unliftio-core unordered-containers
x509 x509-store
];
homepage = "https://github.com/brendanhay/gogol";
description = "Comprehensive Google Services SDK";
license = "unknown";
};
gogol-cal =
{ mkDerivation, base, gogol-core, stdenv }:
mkDerivation {
pname = "gogol-apps-calendar";
version = "0.3.0";
src = gogol-src;
preCompileBuildDriver = "cd gogol-apps-calendar";
libraryHaskellDepends = [ base gogol-core ];
homepage = "https://github.com/brendanhay/gogol";
description = "Google Calendar SDK";
license = "unknown";
};
hpkgs' = hpkgs.override {
overrides = self: super: {
alex = hlib.dontCheck super.alex;
bookme = self.callPackage (import ./bookme.nix) {};
gogol-core = self.callPackage gogol-core {};
gogol = self.callPackage gogol {};
gogol-apps-calendar = self.callPackage gogol-cal {};
mkDerivation = args: super.mkDerivation (args // {
enableLibraryProfiling = false;
doHoogle = false;
doHaddock = false;
});
};
};
in in
hpkgs'.bookme haskell.lib.overrideCabal
(haskellPackages.callPackage ./bookme.nix { })
(drv: {
doCheck = false;
doHaddock = false;
enableLibraryProfiling = false;
src = builtins.filterSource keep ./.;
})
...@@ -7,31 +7,31 @@ dependencies: ...@@ -7,31 +7,31 @@ dependencies:
# See: https://ghc.haskell.org/trac/ghc/ticket/12130 # See: https://ghc.haskell.org/trac/ghc/ticket/12130
- base >=4.8.2.0 && <4.9 || >=4.9.1.0 && <5 - base >=4.8.2.0 && <4.9 || >=4.9.1.0 && <5
- aeson >=0.6 && <1.3 - aeson >=0.6 && <1.5
- blaze-markup >=0.8.2.0 && <0.9 - blaze-markup >=0.8.2.0 && <0.9
- bytestring >=0.9 && <0.11 - bytestring >=0.9 && <0.11
- case-insensitive >=1.2.0.10 && <1.3 - case-insensitive >=1.2.0.10 && <1.3
- classy-prelude >=1.4 && <1.5 - classy-prelude >=1.4 && <1.6
- classy-prelude-yesod >=1.4 && <1.5 - classy-prelude-yesod >=1.4 && <1.6
- containers >=0.5.10.2 && <0.6 - containers >=0.5.10.2 && <0.7
- data-default >=0.7.1.1 && <0.8 - data-default >=0.7.1.1 && <0.8
- directory >=1.1 && <1.4 - directory >=1.1 && <1.4
- exceptions >=0.8.3 && <0.9 - exceptions >=0.8.3 && <0.11
- fast-logger >=2.2 && <2.5 - fast-logger >=2.2 && <2.5
- file-embed >=0.0.10.1 && <0.1 - file-embed >=0.0.10.1 && <0.1
- foreign-store >=0.2 && <0.3 - foreign-store >=0.2 && <0.3
- gogol >=0.3.0 && <0.4 - gogol >=0.3.0 && <0.5
- gogol-apps-calendar >=0.3.0 && <0.4 - gogol-apps-calendar >=0.3.0 && <0.5
- hjsmin >=0.1 && <0.3 - hjsmin >=0.1 && <0.3
- http-client-tls >=0.3 && <0.4 - http-client-tls >=0.3 && <0.4
- http-conduit >=2.3 && <2.4 - http-conduit >=2.3 && <2.4
- http-types >=0.12.1 && <0.13 - http-types >=0.12.1 && <0.13
- lens >=4.16.1 && <4.17 - lens >=4.16.1 && <4.18
- monad-control >=0.3 && <1.1 - monad-control >=0.3 && <1.1
- monad-logger >=0.3 && <0.4 - monad-logger >=0.3 && <0.4
- shakespeare >=2.0 && <2.1 - shakespeare >=2.0 && <2.1
- sorted-list >=0.2.0.0 && <0.3 - sorted-list >=0.2.0.0 && <0.3
- template-haskell >=2.12.0.0 && <2.13 - template-haskell >=2.12.0.0 && <2.15
- text >=0.11 && <2.0 - text >=0.11 && <2.0
- time >=1.8.0.2 && <1.9 - time >=1.8.0.2 && <1.9
- transformers >=0.5.2.0 && <0.6 - transformers >=0.5.2.0 && <0.6
...@@ -42,7 +42,7 @@ dependencies: ...@@ -42,7 +42,7 @@ dependencies:
- wai-extra >=3.0 && <3.1 - wai-extra >=3.0 && <3.1
- wai-logger >=2.2 && <2.4 - wai-logger >=2.2 && <2.4
- warp >=3.0 && <3.3 - warp >=3.0 && <3.3
- yaml >=0.8 && <0.9 - yaml >=0.8 && <0.12
- yesod >=1.6 && <1.7 - yesod >=1.6 && <1.7
- yesod-core >=1.6 && <1.7 - yesod-core >=1.6 && <1.7
- yesod-form >=1.6 && <1.7 - yesod-form >=1.6 && <1.7
......
(import ./default.nix).env { pkgs ? import <nixpkgs> {} }:
with pkgs.haskell.lib;
(doCheck (import ./default.nix {})).env
...@@ -15,10 +15,11 @@ module Settings.Auth ...@@ -15,10 +15,11 @@ module Settings.Auth
import Calendar (CalendarScope) import Calendar (CalendarScope)
import ClassyPrelude.Yesod import ClassyPrelude.Yesod
import Network.Google (ClientId (..), LogLevel (Error), import Network.Google (ClientId (..), LogLevel (Error),
Secret (..), newLogger) newLogger)
import Network.Google.AppsCalendar (calendarScope) import Network.Google.AppsCalendar (calendarScope)
import Network.Google.Auth (Auth (..), import Network.Google.Auth (Auth (..),
Credentials (FromClient), Credentials (FromClient),
GSecret (..),
OAuthClient (..), OAuthCode (..), OAuthClient (..), OAuthCode (..),
OAuthToken (..), OAuthToken (..),
RefreshToken (..), exchange, RefreshToken (..), exchange,
...@@ -30,7 +31,7 @@ import System.Environment (getEnv) ...@@ -30,7 +31,7 @@ import System.Environment (getEnv)
oauthClientFromEnv :: IO OAuthClient oauthClientFromEnv :: IO OAuthClient
oauthClientFromEnv = oauthClientFromEnv =
OAuthClient <$> (ClientId . pack <$> getEnv varGoogleClientId) <*> OAuthClient <$> (ClientId . pack <$> getEnv varGoogleClientId) <*>
(Secret . pack <$> getEnv varGoogleSecret) (GSecret . pack <$> getEnv varGoogleSecret)
authorizeMain :: IO () authorizeMain :: IO ()
authorizeMain = do authorizeMain = do
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# A snapshot resolver dictates the compiler version and the set of packages # A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example: # to be used for project dependencies. For example:
# #
resolver: lts-11.10 resolver: lts-13.19
# User packages to be built. # User packages to be built.
packages: packages:
...@@ -15,7 +15,7 @@ packages: ...@@ -15,7 +15,7 @@ packages:
# Dependency packages to be pulled from upstream that are not in the resolver # Dependency packages to be pulled from upstream that are not in the resolver
extra-deps: extra-deps:
- git: https://github.com/brendanhay/gogol.git - git: https://github.com/brendanhay/gogol.git
commit: 344c9f781560e1ed8395b17e370ba1b085f2edc2 commit: f3a0c09be9a5ddd8ac76747915ea627d70ed56e6
subdirs: subdirs:
- core - core
- gogol - gogol
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment