-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0e70f4b
Showing
5 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
result* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
|
||
with pkgs.lib; | ||
|
||
(pkgs.callPackage ../mkPresentation.nix) { | ||
src = ./.; | ||
name = "example-presentation"; | ||
# reveal version can be changed with revealJS | ||
# 3.5.0 is used by default | ||
revealVersion = "3.4.0"; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
author: John Doe | ||
title: Demo Slide | ||
date: June 21, 2017 | ||
--- | ||
# Foo | ||
```python | ||
print("hello world") | ||
``` | ||
# Bar | ||
* test | ||
* test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Nix expression to generate a slidy presentation | ||
|
||
{ # the nixpkgs set to use | ||
pkgs | ||
, src | ||
, name | ||
, revealVersion ? "3.5.0" | ||
# extra dependencies | ||
,extraBuildInputs ? [] | ||
# assets to include in the result packages, typically examples | ||
,assets ? [] | ||
}: | ||
let | ||
revealJS = fetchTarball "https://github.com/hakimel/reveal.js/archive/${revealVersion}.tar.gz"; | ||
in | ||
|
||
pkgs.stdenv.mkDerivation rec { | ||
inherit name src; | ||
|
||
preferLocalBuild = true; | ||
allowSubstitutes = false; | ||
|
||
# dependencies declaration | ||
buildInputs = with pkgs; [ pandoc ] ++ extraBuildInputs; | ||
|
||
installPhase = '' | ||
mkdir $out | ||
for presentation in $(find . -name "*\.md"); do | ||
id=$(basename $presentation ".md") | ||
pandoc -t revealjs -s -o $out/"$id".html "$id".md | ||
done | ||
ln -s ${revealJS} $out/reveal.js | ||
''; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Reveal.js slides Nix builder | ||
|
||
example slides are in example/presentation.md. | ||
|
||
Can be built by running: | ||
|
||
```sh | ||
$ nix-build example | ||
``` |