nix derivations for appview and knotserver
MODIFIED
.gitignore
MODIFIED
.gitignore
@@ -2,4 +2,5 @@ .direnv/tmp*.db.bin/-appview/pages/static/+appview/pages/static/*+!.gitkeep
MODIFIED
flake.lock
MODIFIED
flake.lock
@@ -1,5 +1,25 @@{"nodes": {+ "gitignore": {+ "inputs": {+ "nixpkgs": [+ "nixpkgs"+ ]+ },+ "locked": {+ "lastModified": 1709087332,+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",+ "owner": "hercules-ci",+ "repo": "gitignore.nix",+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",+ "type": "github"+ },+ "original": {+ "owner": "hercules-ci",+ "repo": "gitignore.nix",+ "type": "github"+ }+ },"htmx-src": {"flake": false,"locked": {@@ -45,6 +65,7 @@ }},"root": {"inputs": {+ "gitignore": "gitignore","htmx-src": "htmx-src","indigo": "indigo","nixpkgs": "nixpkgs"
MODIFIED
flake.nix
MODIFIED
flake.nix
@@ -11,13 +11,18 @@ htmx-src = {url = "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js";flake = false;};+ gitignore = {+ url = "github:hercules-ci/gitignore.nix";+ inputs.nixpkgs.follows = "nixpkgs";+ };};outputs = {- self- , nixpkgs- , indigo- , htmx-src+ self,+ nixpkgs,+ indigo,+ htmx-src,+ gitignore,}: letsupportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];forAllSystems = nixpkgs.lib.genAttrs supportedSystems;@@ -26,6 +31,7 @@ import nixpkgs {inherit system;overlays = [self.overlays.default];});+ inherit (gitignore.lib) gitignoreSource;in {overlays.default = final: prev: {indigo-lexgen = with final;@@ -33,20 +39,43 @@ final.buildGoModule {pname = "indigo-lexgen";version = "0.1.0";src = indigo;- subPackage = ["cmd/lexgen"];+ subPackages = ["cmd/lexgen"];vendorHash = "sha256-pGc29fgJFq8LP7n/pY1cv6ExZl88PAeFqIbFEhB3xXs=";doCheck = false;};++ appview = with final;+ final.buildGoModule {+ pname = "appview";+ version = "0.1.0";+ src = gitignoreSource ./.;+ postConfigureHook = ''+ cp -f ${htmx-src} appview/pages/static/htmx.min.js+ ${pkgs.tailwindcss}/bin/tailwindcss -i input.css -o appview/pages/static/tw.css+ '';+ subPackages = ["cmd/appview"];+ vendorHash = "sha256-QgUPTOgAdKUTg+ztfs194G7pt3/qDtqTMkDRmMECxSo=";+ env.CGO_ENABLED = 1;+ };+ knotserver = with final;+ final.buildGoModule {+ pname = "knotserver";+ version = "0.1.0";+ src = gitignoreSource ./.;+ subPackages = ["cmd/knotserver"];+ vendorHash = "sha256-QgUPTOgAdKUTg+ztfs194G7pt3/qDtqTMkDRmMECxSo=";+ env.CGO_ENABLED = 1;+ };};packages = forAllSystems (system: {- inherit (nixpkgsFor."${system}") indigo-lexgen;+ inherit (nixpkgsFor."${system}") indigo-lexgen appview knotserver;});- defaultPackage = forAllSystems (system: nixpkgsFor.${system}.indigo-lexgen);+ defaultPackage = forAllSystems (system: nixpkgsFor.${system}.appview);formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra);devShells = forAllSystems (system: letpkgs = nixpkgsFor.${system};staticShell = pkgs.mkShell.override {- stdenv = pkgs.pkgsStatic.stdenv;+ stdenv = pkgs.pkgsStatic.stdenv;};in {default = staticShell {