aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorRadu <radu@pml4t.net>2023-08-27 16:43:48 -0400
committerRadu <radu@pml4t.net>2023-08-27 16:46:16 -0400
commitdbe9ff667be93ccb67ca7a31effd58cb7ae61377 (patch)
tree3c245032c0d5d32cbfa09a6c6a3b1dff7a3526a3 /flake.nix
parent56498877b12a1223f7e5300af6c445f8e841228c (diff)
Add extension ZIP generator
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 26 insertions, 0 deletions
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
+ '';
+ };
+ });
+}