-
-
Save infinisil/2e64ce69ac1e44bfa1f6896e8244018d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Building library for opaleye-0.6.7004.0.. | |
Using Parsec parser | |
Configuring servant-auth-cookie-0.6.0.3... | |
CallStack (from HasCallStack): | |
die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:950:20 in Cabal-2.4.0.1:Distribution.Simple.Configure | |
configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:460:12 in Cabal-2.4.0.1:Distribution.Simple.Configure | |
configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.4.0.1:Distribution.Simple | |
confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.4.0.1:Distribution.Simple.UserHooks | |
configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.4.0.1:Distribution.Simple | |
defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.4.0.1:Distribution.Simple | |
defaultMain, called at Setup.hs:2:8 in main:Main | |
Setup: Encountered missing dependencies: | |
bytestring-conversion >=0.3.1 && <0.4, | |
http-api-data ==0.3.*, | |
servant <0.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
# The following lists specify which overrides need to be applied for which | |
# packages. | |
# Create a list per override, and add the names of packages in it as strings | |
# (using quotes). Do not use the derivations, but the package names. | |
# The overrides are applied using `makeOverrides` below. | |
# Disable tests for these packages | |
dontCheckPackages = [ | |
"motion-detect-camera" | |
"vinyl" | |
"postgresql-simple" | |
"opaleye-trans" | |
"composite-opaleye" | |
]; | |
# Jailbreak these packages | |
doJailbreakPackages = [ | |
"opaleye-trans" | |
"hpio" | |
]; | |
# Disable haddocks for these packages | |
dontHaddockPackages = [ | |
"motion-detect-camera" | |
"opaleye-trans" | |
"composite-opaleye" | |
]; | |
# Unmark these packages as broken | |
unmarkBrokenPackages = [ | |
# amazonka is marked as broken (19.09 - 07.01.2020) | |
"amazonka" | |
"amazonka-core" | |
"amazonka-s3" | |
"amazonka-sns" | |
"amazonka-sqs" | |
"amazonka-test" | |
"composite-opaleye" | |
"composite-base" | |
"vinyl" | |
"opaleye-trans" | |
"phone-numbers" | |
"hpio" | |
]; | |
# Override config for nixpkgs | |
config = { | |
packageOverrides = pkgs: rec { | |
haskellPackages = | |
let | |
servantDrvs = haskellPackagesNew: | |
let | |
servantsrc = pkgs.fetchFromGitHub { | |
owner = "haskell-servant"; | |
repo = "servant"; | |
rev = "9eb57a6119f9c9045dbd49050bed6f1282611d99"; | |
sha256 = "0kqglih3rv12nmkzxvalhfaaafk4b2irvv9x5xmc48i1ns71y23l"; | |
}; | |
servantCookiesrc = pkgs.fetchFromGitHub { | |
owner = "zohl"; | |
repo = "servant-auth-cookie"; | |
rev = "63e0c3b92d041e15eddb7207584443fc84f27437"; | |
sha256 = "0fphpyq2gkjgwqxivvqz0m9gldcvk7zl8sn9ac6xbc3b9vjlk27l"; | |
}; | |
servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.doJailbreak (haskellPackagesNew.callCabal2nix "servant" "${servantsrc}/servant" {})); | |
servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.doJailbreak (haskellPackagesNew.callCabal2nix "servant-server" "${servantsrc}/servant-server" {})); | |
servant-auth-cookie = pkgs.haskell.lib.dontCheck ( | |
pkgs.haskell.lib.doJailbreak ( | |
haskellPackagesNew.callCabal2nix "servant-auth-cookie" servantCookiesrc { } | |
) | |
); | |
in { | |
inherit servant servant-server servant-auth-cookie; | |
}; | |
# Packages with non-standard versions | |
generatedOverrides = haskellPackagesNew: haskellPackagesOld: rec { | |
inherit (servantDrvs haskellPackagesNew) servant servant-server servant-auth-cookie; | |
# Call the derivation for this project | |
motion-detect-camera = haskellPackagesNew.callCabal2nix "motion-detect-camera" ./. { QuickCheck = haskellPackagesOld.QuickCheck; }; | |
# Call a custom derivation for a dependency | |
# For example: | |
# - use other version than that in nixpkgs | |
# - use a specific git commit | |
# - use a fork | |
postgresql-simple = haskellPackagesOld.callHackage "postgresql-simple" "0.5.4.0" {}; | |
# TODO: 16.01.2020: opaleye-trans 0.5.1 doesn't show up yet in cabal2nix, so a | |
# manual run is needed | |
# opaleye-trans = haskellPackagesOld.callHackage "opaleye-trans" "0.5.1" {}; | |
opaleye-trans = haskellPackagesOld.callPackage nix/opaleye-trans.nix {}; | |
phone-numbers = haskellPackagesOld.callPackage nix/phone-numbers.nix { | |
phonenumber = pkgs.libphonenumber; | |
protobuf = pkgs.protobuf; | |
}; | |
}; | |
# This function creates overrides | |
makeOverrides = function: names: haskellPackagesNew: haskellPackagesOld: | |
let toPackage = name: { | |
inherit name; | |
value = function haskellPackagesOld.${name}; | |
}; | |
in builtins.listToAttrs (map toPackage names); | |
composeExtensionsList = pkgs.lib.fold pkgs.lib.composeExtensions (_: _: {}); | |
# More exotic overrides go here | |
manualOverrides = haskellPackagesNew: haskellPackagesOld: { | |
phone-numbers = haskellPackagesOld.phone-numbers.override { phonenumber = pkgs.libphonenumber; }; | |
# servant-auth-cookie = with pkgs.haskell.lib; dontCheck (doJailbreak (unmarkBroken haskellPackagesOld.servant-auth-cookie)); | |
}; | |
in | |
# apply the overrides | |
pkgs.haskellPackages.override { | |
overrides = with pkgs.haskell.lib; composeExtensionsList [ | |
generatedOverrides | |
(makeOverrides dontCheck dontCheckPackages ) | |
(makeOverrides doJailbreak doJailbreakPackages ) | |
(makeOverrides dontHaddock dontHaddockPackages ) | |
(makeOverrides unmarkBroken unmarkBrokenPackages) | |
manualOverrides | |
]; | |
}; | |
}; | |
}; | |
# import nixpkgs | |
channel = "nixos-19.09"; | |
pkg-src = builtins.fetchTarball ("http://nixos.org/channels/${channel}/nixexprs.tar.xz"); | |
pkgs = import pkg-src { inherit config; }; | |
in { motion-detect-camera = pkgs.haskellPackages.motion-detect-camera; | |
inherit pkgs; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
servantsrc = pkgs.fetchFromGitHub { | |
owner = "haskell-servant"; | |
repo = "servant"; | |
rev = "9eb57a6119f9c9045dbd49050bed6f1282611d99"; | |
sha256 = "0kqglih3rv12nmkzxvalhfaaafk4b2irvv9x5xmc48i1ns71y23l"; | |
}; | |
servantCookiesrc = pkgs.fetchFromGitHub { | |
owner = "zohl"; | |
repo = "servant-auth-cookie"; | |
rev = "a87aaca613ebc8e4ca213684055d4b1af6f3ca55"; | |
sha256 = "0cv930kv61ffib49dhinks6i64qrsyayk7bx0h444qf366x1jrp7"; | |
}; | |
haskellOverlay = hlib: self: super: { | |
servant = hlib.dontCheck (hlib.doJailbreak (self.callCabal2nix "servant" "${servantsrc}/servant" {})); | |
servant-server = hlib.dontCheck (hlib.doJailbreak (self.callCabal2nix "servant-server" "${servantsrc}/servant-server" {})); | |
servant-auth-cookie = hlib.doJailbreak (self.callCabal2nix "servant-auth-cookie" servantCookiesrc { }); | |
}; | |
pkgs = import <nixpkgs> { | |
config = {}; | |
overlays = [(self: super: { | |
haskellPackages = super.haskellPackages.override { | |
overrides = haskellOverlay self.haskell.lib; | |
}; | |
})]; | |
}; | |
in pkgs.haskellPackages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment