diff options
author | Justin Bedo <cu@cua0.org> | 2020-11-02 11:17:05 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2020-11-02 14:45:34 +1100 |
commit | 8aaecc9093be8531c7c25e24b6b2464536458eee (patch) | |
tree | 3c1395d0ade06a30c57ac01ed90f3a045cc44843 |
init
-rw-r--r-- | .envrc | 9 | ||||
-rw-r--r-- | default.nix | 17 | ||||
-rw-r--r-- | flake.lock | 42 | ||||
-rw-r--r-- | flake.nix | 19 | ||||
-rw-r--r-- | logo-running.pdf | bin | 0 -> 4899 bytes | |||
-rw-r--r-- | logo.pdf | bin | 0 -> 7899 bytes | |||
-rw-r--r-- | shell.nix | 22 | ||||
-rw-r--r-- | slides.tex | 24 | ||||
-rw-r--r-- | tex.nix | 19 |
9 files changed, 152 insertions, 0 deletions
@@ -0,0 +1,9 @@ +use_flake() { + watch_file flake.nix + watch_file flake.lock + watch_file shell.nix + watch_file default.nix + watch_file tex.nix + eval "$(nix print-dev-env)" +} +use flake diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..5ba0079 --- /dev/null +++ b/default.nix @@ -0,0 +1,17 @@ +{ pkgs ? import <nixpkgs> {}, rev ? null }: + +with pkgs; + +stdenv.mkDerivation { + name = "bionix-slides"; + src = ./.; + buildInputs = with pkgs; [ exiftool (callPackage ./tex.nix {}) ]; + buildPhase = '' + latexmk -xelatex slides + ${lib.optionalString (rev != null) "exiftool -Producer='${rev}' slides.pdf"} + ''; + installPhase = '' + mkdir -p $out + cp slides.pdf $out + ''; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..792dc2c --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1601282935, + "narHash": "sha256-WQAFV6sGGQxrRs3a+/Yj9xUYvhTpukQJIcMbIi7LCJ4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "588973065fce51f4763287f0fda87a174d78bf48", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1604275927, + "narHash": "sha256-Hzd/L9+NuDjSjkqa70vUFZYE7+DFrpO9mghJd3/l1pw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6a563e121f5b740308714c9d14c3527b8ba1816b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f019bad --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + description = "BioNix paper"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = import ./shell.nix { inherit pkgs; }; + defaultPackage = if self ? rev then + import ./default.nix { + inherit (self) rev; + inherit pkgs; + } + else + throw "Refusing to build in dirty tree"; + }); +} diff --git a/logo-running.pdf b/logo-running.pdf Binary files differnew file mode 100644 index 0000000..600c616 --- /dev/null +++ b/logo-running.pdf diff --git a/logo.pdf b/logo.pdf Binary files differnew file mode 100644 index 0000000..d5d0526 --- /dev/null +++ b/logo.pdf diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..75e06bd --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +{ pkgs ? import <nixpkgs> {} }: + +with pkgs; + +let + style-check = + stdenv.mkDerivation rec { + name = "style-check"; + src = fetchurl { + url = "http://www.cs.umd.edu/~nspring/software/style-check-current.tar.gz"; + sha256 = "06g1ni28fdbrg2yaa6x8z3kg1mrjvhi48qv45hb80fwyrvy0ds1a"; + }; + installPhase = '' + make PREFIX=$out SYSCONFDIR=$out/etc/style-check.d/ install + sed -ie "s|/etc/style-check.d|$out/etc/style-check.d|g" $out/bin/style-check.rb + ''; + buildInputs = [ ruby ]; + }; + +in mkShell { + buildInputs = with pkgs; [ (callPackage ./tex.nix {}) style-check proselint pandoc ]; +} diff --git a/slides.tex b/slides.tex new file mode 100644 index 0000000..3cee3a1 --- /dev/null +++ b/slides.tex @@ -0,0 +1,24 @@ +\documentclass[aspectratio=169]{beamer} + +\usepackage{microtype} + +\definecolor{bngreen}{HTML}{3c8e64} +%\setbeamercolor*{structure}{bg=white,fg=bngreen} +\usecolortheme[named=bngreen]{structure} +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{headline}{\hfill\includegraphics[width=.7cm]{logo-running}\hspace{0.1cm}\vspace{-.7cm}} + +\author{Justin Bed\H{o}\\WEHI} +\title{\includegraphics[width=.7\linewidth]{logo}\\functional, reproducible bioinformatics workflows} +\date{November 10, 2020} + +\begin{document} + +{ + \setbeamertemplate{headline}{} + \begin{frame} + \maketitle + \end{frame} +} + +\end{document} @@ -0,0 +1,19 @@ +{ texlive }: + +texlive.combine { + inherit (texlive) + scheme-minimal latexmk tools collection-xetex collection-fontsrecommended + biber latexdiff + + abstract acronym alphalph atbegshi atveryend auxhook biblatex bigfoot + booktabs caption cleveref colortbl doi enumitem environ etexcmds etoolbox + eulervm fancyhdr fontspec footmisc geometry gettitlestring graphics hycolor + hyperref hyphenat infwarerr koma-script kvdefinekeys kvoptions kvsetkeys + lastpage logreq ltxcmds mathastext mdframed merriweather microtype nag + needspace newfloat newunicodechar pdftexcmds pgf preprint quoting ragged2e + relsize rerunfilecheck scalerel stringenc sttools textpos titlesec + trimspaces url xcolor xkeyval xpatch xstring zref listings oberdiek + beamer + + ; +} |