From df2a55f82d5efeed8c59c5cf3b4e7381c97959b5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 4 May 2024 12:38:32 +0200 Subject: chore: use prettier with plugin to format go templates --- .../prettier-plugin-go-template/node-packages.nix | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 nix/overlays/prettier-plugin-go-template/node-packages.nix (limited to 'nix/overlays/prettier-plugin-go-template/node-packages.nix') diff --git a/nix/overlays/prettier-plugin-go-template/node-packages.nix b/nix/overlays/prettier-plugin-go-template/node-packages.nix new file mode 100644 index 0000000..449c93c --- /dev/null +++ b/nix/overlays/prettier-plugin-go-template/node-packages.nix @@ -0,0 +1,50 @@ +# This file has been generated by node2nix 1.11.1. Do not edit! + +{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}: + +let + sources = { + "prettier-3.2.5" = { + name = "prettier"; + packageName = "prettier"; + version = "3.2.5"; + src = fetchurl { + url = "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz"; + sha512 = "3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A=="; + }; + }; + "ulid-2.3.0" = { + name = "ulid"; + packageName = "ulid"; + version = "2.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/ulid/-/ulid-2.3.0.tgz"; + sha512 = "keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw=="; + }; + }; + }; +in +{ + prettier-plugin-go-template = nodeEnv.buildNodePackage { + name = "prettier-plugin-go-template"; + packageName = "prettier-plugin-go-template"; + version = "0.0.15"; + src = fetchurl { + url = "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.15.tgz"; + sha512 = "WqU92E1NokWYNZ9mLE6ijoRg6LtIGdLMePt2C7UBDjXeDH9okcRI3zRqtnWR4s5AloiqyvZ66jNBAa9tmRY5EQ=="; + }; + dependencies = [ + sources."prettier-3.2.5" + sources."ulid-2.3.0" + ]; + buildInputs = globalBuildInputs; + meta = { + description = "Prettier plugin for formatting Go & GoHugo templates."; + homepage = "https://github.com/NiklasPor/prettier-plugin-go-template#readme"; + license = "MIT"; + }; + production = true; + bypassCache = true; + reconstructLock = true; + }; +} -- cgit 1.4.1