flake.nix 796 B

123456789101112131415161718192021222324
  1. {
  2. inputs = { nixpkgs.url = "github:nixos/nixpkgs"; };
  3. outputs = { self, nixpkgs }:
  4. let
  5. supportedSystems = nixpkgs.lib.systems.flakeExposed;
  6. perSystem = nixpkgs.lib.genAttrs supportedSystems;
  7. pkgsFor = system: import nixpkgs { inherit system; };
  8. buildResumeFor = system:
  9. let pkgs = pkgsFor system;
  10. in pkgs.runCommand "build-resume" {
  11. nativeBuildInputs = with pkgs; [ pandoc texlive.combined.scheme-context ];
  12. } ''
  13. cd ${self}
  14. make OUT_DIR="$out"
  15. '';
  16. in {
  17. packages.resume = perSystem (system: buildResumeFor system);
  18. devShell =
  19. perSystem (system: import ./shell.nix { pkgs = pkgsFor system; });
  20. defaultPackage = perSystem (system: self.packages.resume.${system});
  21. };
  22. }