git.iko.soy/typeable/pandoc
on master help sign in
Add files for using nix-shell.

'make nix-shell' enters a nix shell with pandoc dependencies installed.

commit91fbea29ddf961654b1c09efaba70d92bfd65cc0 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 12 Jan 2021, 21:18 (6 years ago) parent387d3e7
3 files changed+66−1
Makefile+7−1 default.nix+55 release.nix+4
Makefile+7−1
@@ -91,6 +91,12 @@ README.md: README.template MANUAL.txt tools/update-readme.lua
9191 pandoc --lua-filter tools/update-readme.lua \
9292 --reference-location=section -t gfm $< -o $@
9393
94+default.nix: pandoc.cabal
95+ nix-shell --pure -p cabal2nix --run "cabal2nix ." > $@
96+
97+nix-shell:
98+ nix-shell --attr env release.nix
99+
94100download_stats:
95101 curl https://api.github.com/repos/jgm/pandoc/releases | \
96102 jq -r '.[] | .assets | .[] | "\(.download_count)\t\(.name)"'
@@ -124,4 +130,4 @@ sdist-files.txt: .FORCE
124130git-files.txt: .FORCE
125131 git ls-tree -r --name-only HEAD | grep '^\(test\|data\)\/' | sort > $@
126132
127−.PHONY: .FORCE deps quick full haddock install clean test bench changes_github dist prof download_stats reformat lint weigh doc/lua-filters.md pandoc-templates trypandoc update-website debpkg checkdocs ghcid ghci fix_spacing hlint check check-cabal
133+.PHONY: .FORCE deps quick full haddock install clean test bench changes_github dist prof download_stats reformat lint weigh doc/lua-filters.md pandoc-templates trypandoc update-website debpkg checkdocs ghcid ghci fix_spacing hlint check check-cabal nix-shell
default.nixnew file+55
@@ -0,0 +1,55 @@
1+{ mkDerivation, aeson, aeson-pretty, attoparsec, base
2+, base64-bytestring, binary, blaze-html, blaze-markup, bytestring
3+, case-insensitive, citeproc, commonmark, commonmark-extensions
4+, commonmark-pandoc, connection, containers, criterion
5+, data-default, deepseq, Diff, directory, doclayout, doctemplates
6+, emojis, exceptions, executable-path, file-embed, filepath, Glob
7+, haddock-library, hslua, hslua-module-system, hslua-module-text
8+, HsYAML, HTTP, http-client, http-client-tls, http-types, ipynb
9+, jira-wiki-markup, JuicyPixels, mtl, network, network-uri
10+, pandoc-types, parsec, process, QuickCheck, random, safe
11+, scientific, SHA, skylighting, skylighting-core, split, stdenv
12+, syb, tagsoup, tasty, tasty-golden, tasty-hunit, tasty-lua
13+, tasty-quickcheck, temporary, texmath, text, text-conversions
14+, time, unicode-transforms, unix, unordered-containers, weigh, xml
15+, zip-archive, zlib
16+}:
17+mkDerivation {
18+ pname = "pandoc";
19+ version = "2.11.4";
20+ src = ./.;
21+ configureFlags = [ "-fhttps" "-f-trypandoc" ];
22+ isLibrary = true;
23+ isExecutable = true;
24+ enableSeparateDataOutput = true;
25+ libraryHaskellDepends = [
26+ aeson aeson-pretty attoparsec base base64-bytestring binary
27+ blaze-html blaze-markup bytestring case-insensitive citeproc
28+ commonmark commonmark-extensions commonmark-pandoc connection
29+ containers data-default deepseq directory doclayout doctemplates
30+ emojis exceptions file-embed filepath Glob haddock-library hslua
31+ hslua-module-system hslua-module-text HsYAML HTTP http-client
32+ http-client-tls http-types ipynb jira-wiki-markup JuicyPixels mtl
33+ network network-uri pandoc-types parsec process random safe
34+ scientific SHA skylighting skylighting-core split syb tagsoup
35+ temporary texmath text text-conversions time unicode-transforms
36+ unix unordered-containers xml zip-archive zlib
37+ ];
38+ executableHaskellDepends = [ base ];
39+ testHaskellDepends = [
40+ base base64-bytestring bytestring containers Diff directory
41+ doctemplates exceptions executable-path filepath Glob hslua mtl
42+ pandoc-types process QuickCheck tasty tasty-golden tasty-hunit
43+ tasty-lua tasty-quickcheck temporary text time xml zip-archive
44+ ];
45+ benchmarkHaskellDepends = [
46+ base bytestring containers criterion mtl text time weigh
47+ ];
48+ postInstall = ''
49+ mkdir -p $out/share/man/man1
50+ mv "man/"*.1 $out/share/man/man1/
51+ '';
52+ homepage = "https://pandoc.org";
53+ description = "Conversion between markup formats";
54+ license = stdenv.lib.licenses.gpl2Plus;
55+}
release.nixnew file+4
@@ -0,0 +1,4 @@
1+let
2+ pkgs = import <nixpkgs> { };
3+in
4+ pkgs.haskellPackages.callPackage ./default.nix { }