-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
42 lines (38 loc) · 1.24 KB
/
Copy pathflake.nix
File metadata and controls
42 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
description = "ContextCloak: Gordian Envelope cryptographic primitives for Promptyst";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
typix = {
url = "github:loqusion/typix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, flake-utils, typix, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
typixLib = typix.lib.${system};
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
type == "directory"
|| pkgs.lib.hasSuffix ".typ" path
|| pkgs.lib.hasSuffix ".toml" path;
};
mkTestCheck = testFile: typixLib.mkTypstDerivation {
name = "contextcloak-${builtins.replaceStrings ["/"] ["-"] testFile}";
inherit src;
buildPhaseTypstCommand = "typst compile --root . ${testFile} output.pdf";
installPhaseCommand = "touch $out";
};
in {
checks = {
test-envelope = mkTestCheck "tests/test-envelope.typ";
};
devShells.default = typixLib.devShell {
packages = [ pkgs.just ];
};
}
);
}