aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--README.md3
-rw-r--r--flake.lock61
-rw-r--r--flake.nix26
4 files changed, 94 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1f15462
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+# Nix
+/result
diff --git a/README.md b/README.md
index b01a1cd..633ffc5 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,9 @@ A browser extension that converts commands (some TeX) in textboxes to unicode as
one types. It is intended particularly for inserting simple mathematics in
chats without native support. Ignore the cheesy name.
+To bundle the extension, run `nix build` in the root of this repository. The
+result will be available at `result/tex-type.zip`.
+
## 'Supported' Websites
The extension should work with `<input type="text">`, `<textarea>` and
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..b0e4f7a
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,61 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1692799911,
+ "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1693087214,
+ "narHash": "sha256-Kn1SSqRfPpqcI1MDy82JXrPT1WI8c03TA2F0xu6kS+4=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "f155f0cf4ea43c4e3c8918d2d327d44777b6cad4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-23.05",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..47a4abd
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,26 @@
+{
+ 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 = "tex-type";
+ src = ./.;
+ nativeBuildInputs = [ pkgs.zip ];
+ buildPhase = ''
+ mkdir $out
+ zip --recurse-paths $out/tex-type.zip \
+ icons/ lib/ *.js manifest.json options.html popup.html
+ '';
+ };
+ });
+}