fork of whitequark.org/git-pages with mods for tangled

Initial Nix flake

authored by bin and committed by whitequark.org 6f932df8 f99298d3

+2
.gitignore
··· 1 + /result 2 + /result-* 1 3 /bin 2 4 /data 3 5 /config.toml
+77
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1731533236, 9 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 + "nix-filter": { 22 + "locked": { 23 + "lastModified": 1757882181, 24 + "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=", 25 + "owner": "numtide", 26 + "repo": "nix-filter", 27 + "rev": "59c44d1909c72441144b93cf0f054be7fe764de5", 28 + "type": "github" 29 + }, 30 + "original": { 31 + "owner": "numtide", 32 + "repo": "nix-filter", 33 + "type": "github" 34 + } 35 + }, 36 + "nixpkgs": { 37 + "locked": { 38 + "lastModified": 1758029226, 39 + "narHash": "sha256-TjqVmbpoCqWywY9xIZLTf6ANFvDCXdctCjoYuYPYdMI=", 40 + "owner": "NixOS", 41 + "repo": "nixpkgs", 42 + "rev": "08b8f92ac6354983f5382124fef6006cade4a1c1", 43 + "type": "github" 44 + }, 45 + "original": { 46 + "owner": "NixOS", 47 + "ref": "nixpkgs-unstable", 48 + "repo": "nixpkgs", 49 + "type": "github" 50 + } 51 + }, 52 + "root": { 53 + "inputs": { 54 + "flake-utils": "flake-utils", 55 + "nix-filter": "nix-filter", 56 + "nixpkgs": "nixpkgs" 57 + } 58 + }, 59 + "systems": { 60 + "locked": { 61 + "lastModified": 1681028828, 62 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 63 + "owner": "nix-systems", 64 + "repo": "default", 65 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 66 + "type": "github" 67 + }, 68 + "original": { 69 + "owner": "nix-systems", 70 + "repo": "default", 71 + "type": "github" 72 + } 73 + } 74 + }, 75 + "root": "root", 76 + "version": 7 77 + }
+55
flake.nix
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 4 + flake-utils.url = "github:numtide/flake-utils"; 5 + nix-filter.url = "github:numtide/nix-filter"; 6 + }; 7 + 8 + outputs = 9 + { 10 + self, 11 + nixpkgs, 12 + flake-utils, 13 + nix-filter, 14 + }: 15 + flake-utils.lib.eachDefaultSystem ( 16 + system: 17 + let 18 + pkgs = nixpkgs.legacyPackages.${system}; 19 + 20 + git-pages = pkgs.buildGo125Module { 21 + pname = "git-pages"; 22 + version = "1.0.0"; 23 + 24 + src = nix-filter { 25 + root = self; 26 + 27 + include = [ 28 + "go.mod" 29 + "go.sum" 30 + 31 + (nix-filter.lib.inDirectory "src") 32 + ]; 33 + }; 34 + 35 + vendorHash = "sha256-WVnxNtCCk6T+EsT6Wvd+yR2mxU03SNnSwpeYlYLOCGU="; 36 + 37 + fixupPhase = '' 38 + # Apparently `go install` doesn't support renaming the binary, so country girls make do. 39 + mv $out/bin/{src,git-pages} 40 + ''; 41 + }; 42 + in 43 + { 44 + formatter = pkgs.nixfmt-tree; 45 + 46 + devShells.default = pkgs.mkShell { 47 + inputsFrom = [ 48 + git-pages 49 + ]; 50 + }; 51 + 52 + packages.default = git-pages; 53 + } 54 + ); 55 + }