Last active
May 1, 2018 12:54
-
-
Save MagnificentPako/8438bdacba89c2d2beeec0288e85505d 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
let overlays = [ | |
(self: super: { | |
haskellPackages.callPackage = super.haskellPackages.callPackage; | |
haskellPackages.pandoc = super.callPackage | |
({ mkDerivation, aeson, aeson-pretty, base, base-compat | |
, base64-bytestring, binary, blaze-html, blaze-markup, bytestring | |
, Cabal, case-insensitive, cmark-gfm, containers, criterion | |
, data-default, deepseq, Diff, directory, doctemplates, exceptions | |
, executable-path, filepath, Glob, haddock-library, hslua | |
, hslua-module-text, HTTP, http-client, http-client-tls, http-types | |
, JuicyPixels, mtl, network, network-uri, pandoc-types, parsec | |
, process, QuickCheck, random, safe, scientific, SHA, skylighting | |
, split, syb, tagsoup, tasty, tasty-golden, tasty-hunit | |
, tasty-quickcheck, temporary, texmath, text, time, unix | |
, unordered-containers, vector, weigh, xml, yaml, zip-archive, zlib | |
}: | |
mkDerivation { | |
pname = "pandoc"; | |
version = "2.2"; | |
sha256 = "0sc51sw7g9jni9jamj7rcdn9fqf5476gzp7cahhkjj29xak88a8g"; | |
configureFlags = [ "-fhttps" "-f-trypandoc" ]; | |
isLibrary = true; | |
isExecutable = true; | |
enableSeparateDataOutput = true; | |
setupHaskellDepends = [ base Cabal ]; | |
libraryHaskellDepends = [ | |
aeson aeson-pretty base base-compat base64-bytestring binary | |
blaze-html blaze-markup bytestring case-insensitive cmark-gfm | |
containers data-default deepseq directory doctemplates exceptions | |
filepath Glob haddock-library hslua hslua-module-text HTTP | |
http-client http-client-tls http-types JuicyPixels mtl network | |
network-uri pandoc-types parsec process random safe scientific SHA | |
skylighting split syb tagsoup temporary texmath text time unix | |
unordered-containers vector xml yaml zip-archive zlib | |
]; | |
executableHaskellDepends = [ base base-compat ]; | |
testHaskellDepends = [ | |
base base-compat base64-bytestring bytestring containers Diff | |
directory executable-path filepath Glob hslua pandoc-types process | |
QuickCheck tasty tasty-golden tasty-hunit tasty-quickcheck | |
temporary text time xml zip-archive | |
]; | |
benchmarkHaskellDepends = [ | |
base base-compat bytestring containers criterion mtl text time | |
weigh | |
]; | |
doCheck = false; | |
homepage = "https://pandoc.org"; | |
description = "Conversion between markup formats"; | |
license = super.stdenv.lib.licenses.gpl2; | |
hydraPlatforms = super.stdenv.lib.platforms.none; | |
maintainers = with super.stdenv.lib.maintainers; [ peti ]; | |
}) {}; | |
haskellPackages.pandoc-types = super.callPackage | |
({ mkDerivation, aeson, base, bytestring, containers, criterion | |
, deepseq, ghc-prim, HUnit, QuickCheck, string-qq, syb | |
, test-framework, test-framework-hunit, test-framework-quickcheck2 | |
, transformers | |
}: | |
mkDerivation { | |
pname = "pandoc-types"; | |
version = "1.17.4.2"; | |
sha256 = "1jiy4siyfcf4z0m0kn0z58cbrsvggavlxljrcb4srwblih55xqap"; | |
revision = "1"; | |
editedCabalFile = "0izgzjfl7l4fb6xd5iqcy5zca4m1vzvr5xqgccw45vkm8q3arqnf"; | |
libraryHaskellDepends = [ | |
aeson base bytestring containers deepseq ghc-prim QuickCheck syb | |
transformers | |
]; | |
testHaskellDepends = [ | |
aeson base bytestring containers HUnit QuickCheck string-qq syb | |
test-framework test-framework-hunit test-framework-quickcheck2 | |
]; | |
benchmarkHaskellDepends = [ base criterion ]; | |
homepage = "http://johnmacfarlane.net/pandoc"; | |
description = "Types for representing a structured document"; | |
license = super.stdenv.lib.licenses.bsd3; | |
hydraPlatforms = super.stdenv.lib.platforms.none; | |
}) {}; | |
}) | |
]; in | |
{ nixpkgs ? import <nixpkgs> {inherit overlays;}, compiler ? "default", doBenchmark ? false }: | |
let | |
inherit (nixpkgs) pkgs; | |
f = { mkDerivation, base, bytestring, containers, dhall | |
, download-curl, pandoc, pretty-simple, stdenv, text | |
, pandoc-types | |
}: | |
mkDerivation { | |
pname = "Overbook"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
executableHaskellDepends = [ | |
base bytestring containers dhall download-curl pandoc pretty-simple | |
text pandoc-types | |
]; | |
license = stdenv.lib.licenses.bsd3; | |
}; | |
haskellPackages = if compiler == "default" | |
then pkgs.haskellPackages | |
else pkgs.haskell.packages.${compiler}; | |
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | |
drv = variant (haskellPackages.callPackage f {}); | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment