aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorRadu <radu@pml4t.net>2023-11-22 18:33:44 -0500
committerRadu <radu@pml4t.net>2023-11-22 22:15:41 -0500
commit3e4feb710a88ec81c5476e762cb1c0cd02da18c8 (patch)
treee06e16346b5a8b82beef88c3b26d07389e09e36b /flake.nix
Bodge together LaTeX and code support
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..e047570
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,25 @@
+{
+ inputs = {
+ flake-utils.url = "github:numtide/flake-utils";
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
+ };
+
+ outputs = { flake-utils, nixpkgs, ... }@flakeInputs:
+ let inherit (nixpkgs) lib;
+ in flake-utils.lib.eachDefaultSystem (system:
+ let
+ manifest = builtins.fromJSON (builtins.readFile ./manifest.json);
+ pkgs = import nixpkgs { localSystem = { inherit system; }; };
+ in {
+ packages.default = pkgs.stdenvNoCC.mkDerivation {
+ inherit (manifest) version;
+ pname = "asap";
+ src = ./.;
+ nativeBuildInputs = [ pkgs.zip ];
+ buildPhase = ''
+ mkdir $out
+ zip --recurse-paths $out/asap.zip manifest.json page.js hljs/ katex/
+ '';
+ };
+ });
+}