all repos — site @ c929980c206b627f00afe0bbecc0e1980f5cfd81

source for my site, found at icyphox.sh

nix: add vite to devShell
Anirudh Oppiliappan x@icyphox.sh
Sun, 19 Mar 2023 15:20:45 +0200
commit

c929980c206b627f00afe0bbecc0e1980f5cfd81

parent

8535bfcd75a618e539132fc6f609ca4dc7c75fe9

2 files changed, 142 insertions(+), 14 deletions(-)

jump to
M flake.lockflake.lock

@@ -1,5 +1,54 @@

{ "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1677459247, + "narHash": "sha256-JbakfAiPYmCCV224yAMq/XO0udN5coWv/oazblMKdoY=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1647350163,

@@ -14,9 +63,78 @@ "id": "nixpkgs",

"type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1658285632, + "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1678898370, + "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ac718d02867a84b42522a0ece52d841188208f2c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "vite": "vite" + } + }, + "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "vite": { + "inputs": { + "flake-utils": "flake-utils_2", + "gomod2nix": "gomod2nix", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1679221258, + "narHash": "sha256-F0ChweTmIe/VKfj4lFBd1fN843KlP5f5CHbCDosGWrs=", + "owner": "icyphox", + "repo": "go-vite", + "rev": "bc18e19877fdb3475feb5456afaadf29dd873df7", + "type": "github" + }, + "original": { + "owner": "icyphox", + "repo": "go-vite", + "type": "github" } } },
M flake.nixflake.nix

@@ -1,18 +1,28 @@

{ description = "site"; - outputs = { self, nixpkgs }: { - devShell.x86_64-linux = - let - pkgs = nixpkgs.legacyPackages.x86_64-linux; - in - pkgs.mkShell { - buildInputs = with pkgs; [ - go - gotools - gnumake - entr - ]; - }; + inputs = { + vite.url = "github:icyphox/go-vite"; + flake-utils.url = "github:numtide/flake-utils"; }; + + outputs = { self, nixpkgs, flake-utils, vite }: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShell = pkgs.mkShell { + buildInputs = [ + vite.packages.${system}.default + pkgs.go + pkgs.gotools + pkgs.gnumake + pkgs.entr + ]; + }; + } + ); + }