Flake Inputs: • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-03-14) rev: 190c775a08ca092ac0145ce3483a421bfdc940c6 → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-03-15) rev: 77b60a03b2785fa8ce461069f2ba2f241c2a1557 • Updated input 'hyprgrass': 'github:horriblename/hyprgrass' (2025-03-14) rev: 94ebb595b646c9788b9d39928648deab24ece9d0 → 'github:horriblename/hyprgrass' (2025-03-15) rev: 5453be107e8c7b88f6274122d064bf602852745f • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-03-15) rev: e59680481d74fdfcc432bb9640ba2c979022c4c2 → 'github:hyprwm/Hyprland' (2025-03-15) rev: bf5e4bf11662ebedcae44cd846ba5e755d7a6ba1 • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS' (2025-03-14) rev: 534188d0b0cbddf3f9df3f20cfbc424efb46b36c → 'github:Jovian-Experiments/Jovian-NixOS' (2025-03-15) rev: ecaf8b6aa7d28cb7b87da334310fbe1ba31f8d64 • Updated input 'material-symbols-src': 'github:beecho01/material-symbols' (2025-03-14) rev: 376709da5aa69163ffb02deb13e9e7fac93ae53f → 'github:beecho01/material-symbols' (2025-03-15) rev: 5c209b25151271a01ab73d02bda0ed4709c681eb • Updated input 'nix-develop-nvim-src': 'github:matt1432/nix-develop.nvim' (2025-01-08) rev: b0b9487c083bbc4274e97d25438419a35a67fb77 → 'github:matt1432/nix-develop.nvim' (2025-03-15) rev: 66ab22c7618e3b0d548ffd3d23b52b9d60a40160 • Updated input 'nix-gaming': 'github:fufexan/nix-gaming' (2025-03-14) rev: b2a32ef80ad0cc7f3dee928771791625ff9494c1 → 'github:fufexan/nix-gaming' (2025-03-15) rev: 0894bfe2c7f48091c1f5100f39bdfa0e19d08ab4 • Updated input 'nixcord': 'github:kaylorben/nixcord' (2025-03-13) rev: 91abbf5736459beeacb1c3163a2236241cfc6c71 → 'github:kaylorben/nixcord' (2025-03-15) rev: c1a2a14393dba951994442199b9adfe14bb78a99 • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland' (2025-03-15) rev: ff6a5e6d2e8ae7ffff051ea35966ae2d225f397e → 'github:nix-community/nixpkgs-wayland' (2025-03-15) rev: 538fb64a8a28e258ad1758a9691cfa5a2c8d7a75 • Updated input 'tuya-local-src': 'github:make-all/tuya-local' (2025-03-09) rev: 684b181888a46fd9ec9927c9a02522259eb98c56 → 'github:make-all/tuya-local' (2025-03-15) rev: 66c9f8b052bf1ff0140b28bb2682ae9804efd769 nix-update executions: homepage: 1.0.2 -> 1.0.3
99 lines
2.7 KiB
Nix
99 lines
2.7 KiB
Nix
{
|
|
# params
|
|
enableLocalIcons ? true,
|
|
# nix build inputs
|
|
lib,
|
|
stdenv,
|
|
concatTextFile,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
# deps
|
|
nodejs,
|
|
pnpm,
|
|
...
|
|
}: let
|
|
inherit (lib) getExe optionalString;
|
|
|
|
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "homepage-dashboard";
|
|
version = "1.0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gethomepage";
|
|
repo = "homepage";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-7fi7cW+DKjU9CeVEg863UGwCqTXxA1UrwlK2vrx1c5w=";
|
|
};
|
|
|
|
pnpmDepsHash = "sha256-E16+JLtfoiWCXwgFGdTGuFlx/pYxhINNl6tCuF9Z6MQ=";
|
|
|
|
pnpmDeps = pnpm.fetchDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
hash = finalAttrs.pnpmDepsHash;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
nodejs
|
|
pnpm.configHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
pnpm build
|
|
|
|
# Add a shebang to the server js file
|
|
sed -i '1s|^|#!${getExe nodejs}\n|' .next/standalone/server.js
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/{share,bin}
|
|
|
|
# Without this, homepage-dashboard errors when trying to
|
|
# write its prerender cache.
|
|
#
|
|
# This ensures that the cache implementation respects the env
|
|
# variable `HOMEPAGE_CACHE_DIR`, which is set by default in the
|
|
# wrapper below.
|
|
substituteInPlace .next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js --replace-fail \
|
|
"this.serverDistDir = ctx.serverDistDir;" \
|
|
"this.serverDistDir = require('node:path').join(process.env.HOMEPAGE_CACHE_DIR, \"homepage\");"
|
|
|
|
cp -r .next/standalone $out/share/homepage/
|
|
cp -r public $out/share/homepage/public
|
|
|
|
mkdir -p $out/share/homepage/.next
|
|
cp -r .next/static $out/share/homepage/.next/static
|
|
|
|
chmod +x $out/share/homepage/server.js
|
|
|
|
makeWrapper $out/share/homepage/server.js $out/bin/homepage \
|
|
--set-default PORT 3000 \
|
|
--set-default HOMEPAGE_CONFIG_DIR /var/lib/homepage-dashboard \
|
|
--set-default HOMEPAGE_CACHE_DIR /var/cache/homepage-dashboard
|
|
|
|
${optionalString enableLocalIcons installLocalIcons}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = concatTextFile {
|
|
name = "update";
|
|
files = [./update.sh];
|
|
executable = true;
|
|
destination = "/bin/update";
|
|
};
|
|
|
|
meta = {
|
|
mainProgram = "homepage";
|
|
license = lib.licenses.gpl3;
|
|
homepage = "https://gethomepage.dev";
|
|
changelog = "https://github.com/gethomepage/homepage/releases/tag/v${finalAttrs.version}";
|
|
description = ''
|
|
Highly customisable dashboard with Docker and service API integrations.
|
|
'';
|
|
};
|
|
})
|