fork of anirudh.fi/vite that uses chroma for hl
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nix: use buildGoModule in favor of gomod2nix

+52 -159
+6 -74
flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "flake-utils": { 4 - "locked": { 5 - "lastModified": 1678901627, 6 - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", 7 - "owner": "numtide", 8 - "repo": "flake-utils", 9 - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", 10 - "type": "github" 11 - }, 12 - "original": { 13 - "owner": "numtide", 14 - "repo": "flake-utils", 15 - "type": "github" 16 - } 17 - }, 18 - "gomod2nix": { 19 - "inputs": { 20 - "nixpkgs": "nixpkgs", 21 - "utils": "utils" 22 - }, 23 - "locked": { 24 - "lastModified": 1677459247, 25 - "narHash": "sha256-JbakfAiPYmCCV224yAMq/XO0udN5coWv/oazblMKdoY=", 26 - "owner": "nix-community", 27 - "repo": "gomod2nix", 28 - "rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d", 29 - "type": "github" 30 - }, 31 - "original": { 32 - "owner": "nix-community", 33 - "repo": "gomod2nix", 34 - "type": "github" 35 - } 36 - }, 37 3 "nixpkgs": { 38 4 "locked": { 39 - "lastModified": 1658285632, 40 - "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=", 41 - "owner": "NixOS", 42 - "repo": "nixpkgs", 43 - "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3", 44 - "type": "github" 45 - }, 46 - "original": { 47 - "owner": "NixOS", 48 - "ref": "master", 49 - "repo": "nixpkgs", 50 - "type": "github" 51 - } 52 - }, 53 - "nixpkgs_2": { 54 - "locked": { 55 - "lastModified": 1678898370, 56 - "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", 57 - "owner": "NixOS", 5 + "lastModified": 1716807034, 6 + "narHash": "sha256-AQwfMBtC8tiDZHEgLssOU4qUiRhC2nO+YdxAvZXeW7o=", 7 + "owner": "nixos", 58 8 "repo": "nixpkgs", 59 - "rev": "ac718d02867a84b42522a0ece52d841188208f2c", 9 + "rev": "e751fce87c5d9a8c9375b59d5b508a34a76b5623", 60 10 "type": "github" 61 11 }, 62 12 "original": { 63 - "owner": "NixOS", 64 - "ref": "nixos-unstable", 13 + "owner": "nixos", 65 14 "repo": "nixpkgs", 66 15 "type": "github" 67 16 } 68 17 }, 69 18 "root": { 70 19 "inputs": { 71 - "flake-utils": "flake-utils", 72 - "gomod2nix": "gomod2nix", 73 - "nixpkgs": "nixpkgs_2" 74 - } 75 - }, 76 - "utils": { 77 - "locked": { 78 - "lastModified": 1653893745, 79 - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", 80 - "owner": "numtide", 81 - "repo": "flake-utils", 82 - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", 83 - "type": "github" 84 - }, 85 - "original": { 86 - "owner": "numtide", 87 - "repo": "flake-utils", 88 - "type": "github" 20 + "nixpkgs": "nixpkgs" 89 21 } 90 22 } 91 23 },
+38 -16
flake.nix
··· 1 1 { 2 2 description = "a fast and minimal static site generator"; 3 3 4 - inputs = 4 + inputs.nixpkgs.url = "github:nixos/nixpkgs"; 5 + 6 + outputs = 7 + { self 8 + , nixpkgs 9 + , 10 + }: 11 + let 12 + supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; 13 + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 14 + nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); 15 + in 5 16 { 6 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 7 - flake-utils.url = "github:numtide/flake-utils"; 8 - gomod2nix.url = "github:nix-community/gomod2nix"; 9 - }; 10 - 11 - outputs = { self, nixpkgs, flake-utils, gomod2nix }: 12 - (flake-utils.lib.eachDefaultSystem 13 - (system: 17 + overlay = final: prev: { 18 + vite = self.packages.${prev.system}.gostart; 19 + }; 20 + nixosModule = import ./module.nix; 21 + packages = forAllSystems (system: 14 22 let 15 - pkgs = import nixpkgs { 16 - inherit system; 17 - overlays = [ gomod2nix.overlays.default ]; 23 + pkgs = nixpkgsFor.${system}; 24 + in 25 + { 26 + vite = pkgs.buildGoModule { 27 + name = "vite"; 28 + rev = "master"; 29 + src = ./.; 30 + 31 + vendorHash = "sha256-aHPT3Vl0is+NYaHqkdDjDjEVjvXnwCqK7Bbgm5FhBT0="; 18 32 }; 33 + }); 19 34 35 + defaultPackage = forAllSystems (system: self.packages.${system}.vite); 36 + devShells = forAllSystems (system: 37 + let 38 + pkgs = nixpkgsFor.${system}; 20 39 in 21 40 { 22 - packages.default = pkgs.callPackage ./. { }; 23 - devShells.default = import ./shell.nix { inherit pkgs; }; 24 - }) 25 - ); 41 + default = pkgs.mkShell { 42 + nativeBuildInputs = with pkgs; [ 43 + go 44 + ]; 45 + }; 46 + }); 47 + }; 26 48 }
+8 -3
go.mod
··· 1 1 module git.icyphox.sh/vite 2 2 3 - go 1.15 3 + go 1.21 4 4 5 5 require ( 6 - git.icyphox.sh/grayfriday v0.0.0-20221126034429-23c704183914 // indirect 6 + git.icyphox.sh/grayfriday v0.0.0-20221126034429-23c704183914 7 7 github.com/adrg/frontmatter v0.2.0 8 8 github.com/alecthomas/chroma v0.10.0 9 + gopkg.in/yaml.v2 v2.3.0 9 10 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b 10 - icyphox.sh/grayfriday v0.0.0-20221130034322-1ea518786419 11 + ) 12 + 13 + require ( 14 + github.com/BurntSushi/toml v0.3.1 // indirect 15 + github.com/dlclark/regexp2 v1.4.0 // indirect 11 16 )
-2
go.sum
··· 23 23 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 24 24 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= 25 25 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 26 - icyphox.sh/grayfriday v0.0.0-20221130034322-1ea518786419 h1:NfLEP+eVHytaObWE5ffsidoe7G1RQnEc2l9YZorYK8k= 27 - icyphox.sh/grayfriday v0.0.0-20221130034322-1ea518786419/go.mod h1:9o5/tCXAQ8RPfaRdo7087zucRyJoQHE+T5YCRxGaBzE=
-42
gomod2nix.toml
··· 1 - schema = 3 2 - 3 - [mod] 4 - [mod."git.icyphox.sh/grayfriday"] 5 - version = "v0.0.0-20221126034429-23c704183914" 6 - hash = "sha256-cwTiK30/ZNbp1/R6x/DojxVlgnL0vy3vBiklNJi6wUE=" 7 - [mod."github.com/BurntSushi/toml"] 8 - version = "v0.3.1" 9 - hash = "sha256-Rqak1dE/Aj/+Kx1/pl3Hifgt+Q3OzuZ5fJR+/x3nTbo=" 10 - [mod."github.com/adrg/frontmatter"] 11 - version = "v0.2.0" 12 - hash = "sha256-WJsVcdCpkIkjqUz5fJOFStZYwQlrcFzQ6+mZatZiimo=" 13 - [mod."github.com/alecthomas/chroma"] 14 - version = "v0.10.0" 15 - hash = "sha256-p721vddVTv4iv1O0/dqpdk5xF6x9iLIHcrfh8JEVnqQ=" 16 - [mod."github.com/davecgh/go-spew"] 17 - version = "v1.1.1" 18 - hash = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=" 19 - [mod."github.com/dlclark/regexp2"] 20 - version = "v1.4.0" 21 - hash = "sha256-Pk/S2x2rX7xnGFLyoHEw09CoNQimvz/msdPRsxLaLsc=" 22 - [mod."github.com/pmezard/go-difflib"] 23 - version = "v1.0.0" 24 - hash = "sha256-/FtmHnaGjdvEIKAJtrUfEhV7EVo5A/eYrtdnUkuxLDA=" 25 - [mod."github.com/stretchr/objx"] 26 - version = "v0.1.0" 27 - hash = "sha256-az0Vd4MG3JXfaYbj0Q6AOmNkrXgmXDeQm8+BBiDXmdA=" 28 - [mod."github.com/stretchr/testify"] 29 - version = "v1.7.0" 30 - hash = "sha256-t1I9uCrn9vSUu/z5IZuNyGShmbOcJ6UGc2f75ZBrHzE=" 31 - [mod."gopkg.in/check.v1"] 32 - version = "v0.0.0-20161208181325-20d25e280405" 33 - hash = "sha256-1w5mgYaZUC52uzDnpXXVqle/9AVkH4WePSrQFOVANUw=" 34 - [mod."gopkg.in/yaml.v2"] 35 - version = "v2.3.0" 36 - hash = "sha256-8tPC5nMGvUFs97W6+JXsxJLjU6EpDmPG9tXo1DyFoNU=" 37 - [mod."gopkg.in/yaml.v3"] 38 - version = "v3.0.0-20210107192922-496545a6307b" 39 - hash = "sha256-j8yDji+vqsitpRZirpb4w/Em8nstgf28wpwkcrOlxBk=" 40 - [mod."icyphox.sh/grayfriday"] 41 - version = "v0.0.0-20221130034322-1ea518786419" 42 - hash = "sha256-+mS2SbGUSAtgo9sOlpldHrH23AiBT+2OosRz44pDqbg="
-22
shell.nix
··· 1 - { pkgs ? ( 2 - let 3 - inherit (builtins) fetchTree fromJSON readFile; 4 - inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix; 5 - in 6 - import (fetchTree nixpkgs.locked) { 7 - overlays = [ 8 - (import "${fetchTree gomod2nix.locked}/overlay.nix") 9 - ]; 10 - } 11 - ) 12 - }: 13 - 14 - let 15 - goEnv = pkgs.mkGoEnv { pwd = ./.; }; 16 - in 17 - pkgs.mkShell { 18 - packages = [ 19 - goEnv 20 - pkgs.gomod2nix 21 - ]; 22 - }