Monorepo for Tangled tangled.org

nix derivations for appview and knotserver

Changed files
+60 -9
appview
pages
static
+2 -1
.gitignore
··· 2 2 tmp 3 3 *.db 4 4 .bin/ 5 - appview/pages/static/ 5 + appview/pages/static/* 6 + !.gitkeep
appview/pages/static/.gitkeep

This is a binary file and will not be displayed.

+21
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "gitignore": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1709087332, 11 + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 12 + "owner": "hercules-ci", 13 + "repo": "gitignore.nix", 14 + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "hercules-ci", 19 + "repo": "gitignore.nix", 20 + "type": "github" 21 + } 22 + }, 3 23 "htmx-src": { 4 24 "flake": false, 5 25 "locked": { ··· 45 65 }, 46 66 "root": { 47 67 "inputs": { 68 + "gitignore": "gitignore", 48 69 "htmx-src": "htmx-src", 49 70 "indigo": "indigo", 50 71 "nixpkgs": "nixpkgs"
+37 -8
flake.nix
··· 11 11 url = "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"; 12 12 flake = false; 13 13 }; 14 + gitignore = { 15 + url = "github:hercules-ci/gitignore.nix"; 16 + inputs.nixpkgs.follows = "nixpkgs"; 17 + }; 14 18 }; 15 19 16 20 outputs = { 17 - self 18 - , nixpkgs 19 - , indigo 20 - , htmx-src 21 + self, 22 + nixpkgs, 23 + indigo, 24 + htmx-src, 25 + gitignore, 21 26 }: let 22 27 supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; 23 28 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; ··· 26 31 inherit system; 27 32 overlays = [self.overlays.default]; 28 33 }); 34 + inherit (gitignore.lib) gitignoreSource; 29 35 in { 30 36 overlays.default = final: prev: { 31 37 indigo-lexgen = with final; ··· 33 39 pname = "indigo-lexgen"; 34 40 version = "0.1.0"; 35 41 src = indigo; 36 - subPackage = ["cmd/lexgen"]; 42 + subPackages = ["cmd/lexgen"]; 37 43 vendorHash = "sha256-pGc29fgJFq8LP7n/pY1cv6ExZl88PAeFqIbFEhB3xXs="; 38 44 doCheck = false; 39 45 }; 46 + 47 + appview = with final; 48 + final.buildGoModule { 49 + pname = "appview"; 50 + version = "0.1.0"; 51 + src = gitignoreSource ./.; 52 + postConfigureHook = '' 53 + cp -f ${htmx-src} appview/pages/static/htmx.min.js 54 + ${pkgs.tailwindcss}/bin/tailwindcss -i input.css -o appview/pages/static/tw.css 55 + ''; 56 + subPackages = ["cmd/appview"]; 57 + vendorHash = "sha256-QgUPTOgAdKUTg+ztfs194G7pt3/qDtqTMkDRmMECxSo="; 58 + env.CGO_ENABLED = 1; 59 + }; 60 + knotserver = with final; 61 + final.buildGoModule { 62 + pname = "knotserver"; 63 + version = "0.1.0"; 64 + src = gitignoreSource ./.; 65 + subPackages = ["cmd/knotserver"]; 66 + vendorHash = "sha256-QgUPTOgAdKUTg+ztfs194G7pt3/qDtqTMkDRmMECxSo="; 67 + env.CGO_ENABLED = 1; 68 + }; 40 69 }; 41 70 packages = forAllSystems (system: { 42 - inherit (nixpkgsFor."${system}") indigo-lexgen; 71 + inherit (nixpkgsFor."${system}") indigo-lexgen appview knotserver; 43 72 }); 44 - defaultPackage = forAllSystems (system: nixpkgsFor.${system}.indigo-lexgen); 73 + defaultPackage = forAllSystems (system: nixpkgsFor.${system}.appview); 45 74 formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra); 46 75 devShells = forAllSystems (system: let 47 76 pkgs = nixpkgsFor.${system}; 48 77 staticShell = pkgs.mkShell.override { 49 - stdenv = pkgs.pkgsStatic.stdenv; 78 + stdenv = pkgs.pkgsStatic.stdenv; 50 79 }; 51 80 in { 52 81 default = staticShell {