Browse Source

Update to move inline with normal nix building of PDFs

Samuel W. Flint 3 years ago
parent
commit
892cb6922f
2 changed files with 23 additions and 33 deletions
  1. 0 2
      .gitignore
  2. 23 31
      default.nix

+ 0 - 2
.gitignore

@@ -7,13 +7,11 @@ result
 
 # Emacs Stuff
 *~
-\#*\#
 /.emacs.desktop
 /.emacs.desktop.lock
 *.elc
 auto-save-list
 tramp
-.\#*
 
 # Org-mode
 .org-id-locations

+ 23 - 31
default.nix

@@ -1,50 +1,42 @@
-{ nixpkgs ? import <nixpkgs>{} }:
-
-with nixpkgs;
-
+{ pkgs ? import <nixpkgs> { config = { }; overlays = [ ]; } }:
 let
-  lemacs = emacsWithPackages(epkgs:
-    (with epkgs.melpaPackages; [ess]) ++
-    (with epkgs.orgPackages; [org-plus-contrib])
+  lemacs = emacsWithPackages (epkgs:
+    (with epkgs.melpaPackages;
+    [ ess ]
+    ) ++
+    (with epkgs.orgPackages; [ org-plus-contrib ])
   );
 
+  tex = pkgs.texlive.combine {
+    inherit (texlive)
+
+      scheme-small
+      latexmk
+      epstopdf
+
+      ;
+  };
+
+  gitignoreSource = pkgs.nix-gitignore.gitignoreFilterSourcePure (_: _: true);
+
 in
-stdenv.mkDerivation rec {
+pkgs.stdenv.mkDerivation {
 
   name = "document";
 
-  src = ./.;
+  src = gitignoreSource ./.gitignore ./.;
 
   buildInputs = [
     # Emacs -- necessary for building tex file
     lemacs
-
-    # TeX compilation
-    (texlive.combine {
-      inherit (texlive)
-        scheme-small
-        # Directly required packages
-        latexmk
-        epstopdf
-        
-        # Other Packages
-        wrapfig
-        capt-of
-        csquotes
-        xpatch
-        pstricks
-      ;    
-    })
-
-    # Local Packages
-    
+    tex
   ];
 
   buildPhase = "make";
 
   # meta = with lib; {
-  #   description = "UNL LA Program Operations Manuals";
+  #   description = "Description";
   #   licenses = licenses.nonfree;
-  #   author = "LA Program <learningassistants@cse.unl.edu>";
+  #   author = "Name <email>";
   # };
 }