Skip to content

Commit

Permalink
build resume with nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
chfanghr committed Jun 15, 2022
1 parent 343e354 commit 56447a7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
26 changes: 26 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
inputs = { nixpkgs.url = "github:nixos/nixpkgs"; };

outputs = { self, nixpkgs }:
let
supportedSystems = nixpkgs.lib.systems.flakeExposed;
perSystem = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: import nixpkgs { inherit system; };

buildResumeFor = system:
let pkgs = pkgsFor system;
in pkgs.runCommand "build-resume" {
nativeBuildInputs = with pkgs; [ pandoc texlive.combined.scheme-context ];
} ''
cd ${self}
make OUT_DIR="$out"
'';
in {
packages.resume = perSystem (system: buildResumeFor system);
devShell =
perSystem (system: import ./shell.nix { pkgs = pkgsFor system; });
defaultPackage = perSystem (system: self.packages.resume.${system});
};
}
3 changes: 3 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell { buildInputs = [ pandoc texlive.combined.scheme-context gnumake ]; }

0 comments on commit 56447a7

Please sign in to comment.