nixos-configs/packages/homepage/default.nix
matt1432 83fe089c5e
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update sources
Flake Inputs:
    • Updated input 'ags':
        'github:Aylur/ags' (2024-12-26) rev: 46aad56c4eb33cd83cd32b4757b96731bebc81a7
      → 'github:Aylur/ags' (2024-12-28) rev: 8eded03c8f943ee5cfdfb2e77f993b9f125811a5

    • Updated input 'astal':
        'github:matt1432/astal' (2024-12-27) rev: 56332b13fa01b8792a4a8469ef4605be9cdf6305
      → 'github:Aylur/astal' (2024-12-28) rev: b89b08ef482a30726d9e716f593b449ce640099f

    • Updated input 'gpu-screen-recorder-src':
        'git+https://repo.dec05eba.com/gpu-screen-recorder' (2024-12-09) rev: a006261adef704930a8d946806ba051178a14518
      → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2024-12-28) rev: 954f9abe2aed8acf3304860ff308191e9a9a1f0b

    • Updated input 'home-manager':
        'github:nix-community/home-manager' (2024-12-24) rev: 35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84
      → 'github:nix-community/home-manager' (2024-12-28) rev: 10e99c43cdf4a0713b4e81d90691d22c6a58bdf2

    • Updated input 'hyprland':
        'github:hyprwm/Hyprland' (2024-12-26) rev: e75e2cdac79417ffdbbbe903f72668953483a4e7
      → 'github:hyprwm/Hyprland' (2024-12-28) rev: 2b01a5bcf62956a5d641a3367edcd35e103edfcd

    • Updated input 'hyprland-plugins':
        'github:hyprwm/hyprland-plugins' (2024-12-26) rev: 616e7ef0aca905b9b4012d2bedbb9225d51040bf
      → 'github:hyprwm/hyprland-plugins' (2024-12-27) rev: a41bcdccac7d3fe220b3a8519633f0a812da3439

    • Updated input 'hyprutils':
        'github:hyprwm/hyprutils' (2024-12-25) rev: 9be03a8562e3ed9e648d8fcf0930d0ec86d671a4
      → 'github:hyprwm/hyprutils' (2024-12-27) rev: 8f15d45b120b33712f6db477fe5ffb18034d0ea8

    • Updated input 'jellyfin-flake':
        'github:matt1432/nixos-jellyfin' (2024-12-22) rev: 4349d92771f92ab215630e9d2f4a5c2ae3378acc
      → 'github:matt1432/nixos-jellyfin' (2024-12-28) rev: bf97d97184c59598f4837dafbef9203b7a2fdf4b

    • Updated input 'jovian':
        'github:Jovian-Experiments/Jovian-NixOS' (2024-12-20) rev: dbae2fd6adaf34c947d310bec08deac7c4ed265b
      → 'github:Jovian-Experiments/Jovian-NixOS' (2024-12-27) rev: a86d9cf841eff8b33a05d2bf25788abd8e018dbd

    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs' (2024-12-19) rev: d70bd19e0a38ad4790d3913bf08fcbfc9eeca507
      → 'github:NixOS/nixpkgs' (2024-12-27) rev: 634fd46801442d760e09493a794c4f15db2d0cbb

    • Updated input 'spotifyplus-src':
        'github:thlucas1/homeassistantcomponent_spotifyplus' (2024-12-21) rev: 5b5db363a128f12fd62ebdad79d0c50f14923fc6
      → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2024-12-28) rev: 897b92c5fdfdc402037d5d72087e02ac68a745d4

    • Updated input 'spotifywebapi-src':
        'github:thlucas1/SpotifyWebApiPython' (2024-12-21) rev: 37ab1fc0efa62f242adde65bdddfa4ba04d9f6c7
      → 'github:thlucas1/SpotifyWebApiPython' (2024-12-28) rev: 6c968a4fad3d1eae216e5e954af00fbd0ba35036

    • Updated input 'tuya-local-src':
        'github:make-all/tuya-local' (2024-12-27) rev: bfdc5c918ddf1924fafd0900748302391489d862
      → 'github:make-all/tuya-local' (2024-12-28) rev: 1c1030da4da8cfc54e4b45c2433d58aa0b867c64

Node modules:
    pkg-types: 1.2.1 -> 1.3.0

nix-update executions:
    homepage: 0.10.5 -> 0.10.6
2024-12-28 16:35:26 -05:00

95 lines
2.5 KiB
Nix

{
buildNpmPackage,
fetchFromGitHub,
nodePackages,
python3,
stdenv,
cctools,
IOKit ? {},
lib,
enableLocalIcons ? true,
git,
}: let
inherit (lib) optionals optionalString;
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
pname = "homepage-dashboard";
version = "0.10.6";
in
buildNpmPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "gethomepage";
repo = "homepage";
rev = "v${version}";
hash = "sha256-5JdCd/A+wmsZic0OsbqBBTUQO/SinnUtDKYy7iUmtAs=";
};
npmDepsHash = "sha256-AW7lNkvQeeHkAf6Q23912LiSHJMelR9+4KVSKdlFqd0=";
preBuild = ''
mkdir -p config
'';
postBuild = ''
# Add a shebang to the server js file, then patch the shebang.
sed -i '1s|^|#!/usr/bin/env node\n|' .next/standalone/server.js
patchShebangs .next/standalone/server.js
'';
nativeBuildInputs = [git] ++ optionals stdenv.hostPlatform.isDarwin [cctools];
buildInputs =
[
nodePackages.node-gyp-build
]
++ optionals stdenv.hostPlatform.isDarwin [IOKit];
env.PYTHON = "${python3}/bin/python";
installPhase = ''
runHook preInstall
mkdir -p $out/{share,bin}
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
# This patch must be applied here, as it's patching the `dist` directory
# of NextJS. Without this, homepage-dashboard errors when trying to
# write its prerender cache.
#
# This patch ensures that the cache implementation respects the env
# variable `HOMEPAGE_CACHE_DIR`, which is set by default in the
# wrapper below.
pushd $out
git apply ${./prerender_cache_path.patch}
popd
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
'';
doDist = false;
meta = {
description = "Highly customisable dashboard with Docker and service API integrations";
changelog = "https://github.com/gethomepage/homepage/releases/tag/v${version}";
mainProgram = "homepage";
homepage = "https://gethomepage.dev";
license = lib.licenses.gpl3;
};
}