forked from tangled.org/core
this repo has no description

nix derivations for appview and knotserver

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

This is a binary file and will not be displayed.

+21
flake.lock
···
{
"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": {
···
},
"root": {
"inputs": {
+
"gitignore": "gitignore",
"htmx-src": "htmx-src",
"indigo": "indigo",
"nixpkgs": "nixpkgs"
+37 -8
flake.nix
···
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,
}: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
···
inherit system;
overlays = [self.overlays.default];
});
+
inherit (gitignore.lib) gitignoreSource;
in {
overlays.default = final: prev: {
indigo-lexgen = with final;
···
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: let
pkgs = nixpkgsFor.${system};
staticShell = pkgs.mkShell.override {
-
stdenv = pkgs.pkgsStatic.stdenv;
+
stdenv = pkgs.pkgsStatic.stdenv;
};
in {
default = staticShell {