Skip to content

add nix and markdownify readme #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .nix/nixpkgs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"url": "https://github.com/nixos/nixpkgs-channels",
"rev": "f3fa5a101eb74a10f6c53b504e18b42bacccbaeb",
"date": "2019-12-03T16:52:39+00:00",
"sha256": "0mf8n78xhni57f5pgc5rc7l3sgnar95998gi06a1anf8gqnrrhn1",
"fetchSubmodules": false
}
10 changes: 10 additions & 0 deletions .nix/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ owner ? "NixOS"
, repo ? "nixpkgs-channels"
, rev ? "f3fa5a101eb74a10f6c53b504e18b42bacccbaeb"
, sha256 ? "0mf8n78xhni57f5pgc5rc7l3sgnar95998gi06a1anf8gqnrrhn1"
}:

import (builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
inherit sha256;
}) {}
78 changes: 0 additions & 78 deletions README

This file was deleted.

77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Haskell Report
==============

These are the sources to the Haskell report, including all the source files you
will need to generate either the PDF or the HTML version of the report.


Building via Nix
----------------

To build using the [Nix](https://nixos.org/nix/) package manager, simply run
`nix-build`. The PDF and HTML versions can then be found in the `result`
subdirectory.

Alternatively, you can invoke `nix-shell` to enter a shell with the environment
needed to build the report. Once in the shell you can use `make` as normal.

Building manually
-----------------

### Tools you will need

PDF version: a decent LaTeX installation with pdflatex. We use the following
additional packages:

- times
- makeidx
- graphicx
- url
- color
- hyperref

Also you need the following tools

- makeindex

all of which are usually available with a good TeX distribution (e.g. TeX Live).

The following are also required for building the tools:

- flex
- GHC

The HTML version additionally requires

- tex4ht (e.g. install `tex4ht` on a Debian or Ubuntu system, or
`tetex-tex4ht` on a Fedora system)

### Building

Firstly:

$ cd tools
$ make

should build a few tools required for building the report itself. Then you
should be able to say

$ cd report
$ make

This will create:

- PDF version: report/haskell.pdf

- HTML version: report/ht/haskell.html
(NB. requires report/ht/*.{html,png,css})


Roadmap
-------

Source files

- `report/` The Language and Libraries Reports (now together in a single document)
- `tools/` Tools needed to build the Reports (cd into here and type make)
- `Makefile` Build a distribution of the Reports
36 changes: 36 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
with (import ./.nix/nixpkgs.nix {});

stdenv.mkDerivation rec {
pname = "haskell-report";
version = "2020";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it still Haskell Report 2010? Or is this version referring to this nix build?


src = ./.;

buildInputs = [
(texlive.combine {
inherit (texlive)
scheme-basic
tex4ht
tabulary
collection-fontsrecommended;
})
flex
ghc
perl528
ghostscript
];

buildCommand = ''
cp -r ${src} haskell-report
chmod -R u+w haskell-report

cd haskell-report
export HOME=$TMPDIR

make

mkdir $out
cp report/haskell.pdf $out/haskell-report.pdf
cp -r report/ht $out/ht
'';
}