aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..2afb73b
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,18 @@
+{ stdenv
+, ghc
+}:
+stdenv.mkDerivation {
+ name = "latexfmt";
+
+ src = ./.;
+
+ nativeBuildInputs = [ (ghc.withPackages (x: [ x.attoparsec ])) ];
+
+ buildPhase = ''
+ ghc -O -o latexfmt latexfmt.hs
+ '';
+
+ installPhase = ''
+ install -Dm 755 ./latexfmt $out/bin/latexfmt
+ '';
+}