Skip to content

Latest commit

 

History

History
89 lines (71 loc) · 2.62 KB

README-en.md

File metadata and controls

89 lines (71 loc) · 2.62 KB

satyxin

Are you SATySFi-ed with Nix?

License

  • 日本語(おそらくこちらのほうが充実しています)

Example

Status

Usage

This flake is very unstable currently. It may be useful to see also template by author.

Requirements

Setup

Write flake.nix like below, then nix build ".#main" to build document to result/main.pdf.

{
  inputs = { 
    satyxin.url = "github:SnO2WMaN/satyxin";
  };
  outputs = { 
    satyxin, 
    ...
  } @ inputs:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [ 
            satyxin.overlay
          ];
        };
      in rec {
        packages = rec {
          satysfiDist = pkgs.satyxin.buildSatysfiDist {
            # Add pacakges to build your document
            # All available packages https://github.com/SnO2WMaN/satyxin/tree/main/nix/packages
            packages = [
              "bibyfi"
              "sno2wman"
            ];
          };
          main = pkgs.satyxin.buildDocument {
            inherit satysfiDist;
            satysfiLocal = ./.satysfi/local; # optional
            name = "main";
            src = ./src;
            entrypoint = "main.saty";
            output = "main.pdf"; # optional
          };
        }
      }
    );
}

Write .envrc by using direnv.

#!/usr/bin/env bash
use flake

nix build ".#satysfiDist"  --out-link "$(pwd)/.satysfi/dist"

References