Explorar o código

Update style of default.nix for building PDFs

Samuel W. Flint %!s(int64=3) %!d(string=hai) anos
pai
achega
a4a7c7a206
Modificáronse 1 ficheiros con 15 adicións e 23 borrados
  1. 15 23
      default.nix

+ 15 - 23
default.nix

@@ -1,33 +1,25 @@
-{ nixpkgs ? import <nixpkgs>{} }:
+{ pkgs ? import <nixpkgs> { config = { }; overlays = [ ]; } }:
+let
+  tex = pkgs.texlive.combine {
+    inherit (pkgs.texlive)
 
-with nixpkgs;
+      scheme-small
+      latexmk
 
-stdenv.mkDerivation rec {
+      ;
+  };
+
+  gitignoreSource = pkgs.nix-gitignore.gitignoreFilterSourcePure (_: _: true);
+
+in
+pkgs.stdenv.mkDerivation rec {
 
   name = "document";
 
-  src = ./.;
+  src = gitignoreSource ./.gitignore ./.;
 
   buildInputs = [
-    (texlive.combine {
-      inherit (texlive)
-        scheme-small
-
-      # Directly required packages
-        latexmk
-        csquotes
-        everypage
-        marginnote
-        glossaries
-
-      # Apparently required
-        mfirstuc
-        xfor
-        datatool
-        substr
-        tracklang
-      ;    
-    })
+    tex
   ];
 
   buildPhase = "make";