Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2024-11-07 19:42:50 +01:00
{
lib,
stdenvNoCC,
fetchFromGitHub,
2025-01-15 10:03:13 +01:00
pnpm_9,
2024-11-07 19:42:50 +01:00
nodejs,
dart-sass,
nix-update-script,
2024-12-27 18:36:59 +01:00
nixosTests,
2024-11-07 19:42:50 +01:00
}:
stdenvNoCC.mkDerivation rec {
pname = "homer";
2025-04-06 17:35:08 +02:00
version = "25.04.1";
2024-11-07 19:42:50 +01:00
src = fetchFromGitHub {
owner = "bastienwirtz";
repo = "homer";
rev = "v${version}";
2025-04-06 17:35:08 +02:00
hash = "sha256-hvDrFGv6Mht9whA2lJbDLQnP2LkOiCo3NtjMpWr/q6A=";
2024-11-07 19:42:50 +01:00
};
2025-01-15 10:03:13 +01:00
pnpmDeps = pnpm_9.fetchDeps {
2024-11-07 19:42:50 +01:00
inherit
pname
version
src
patches
;
fetcherVersion = 1;
hash = "sha256-y1R+rlaOtFOHHAgEHPBl40536U10Ft0iUSfGcfXS08Y=";
2024-11-07 19:42:50 +01:00
};
# Enables specifying a custom Sass compiler binary path via `SASS_EMBEDDED_BIN_PATH` environment variable.
patches = [ ./0001-build-enable-specifying-custom-sass-compiler-path-by.patch ];
2024-11-07 19:42:50 +01:00
nativeBuildInputs = [
nodejs
dart-sass
2025-01-15 10:03:13 +01:00
pnpm_9.configHook
2024-11-07 19:42:50 +01:00
];
buildPhase = ''
runHook preBuild
export SASS_EMBEDDED_BIN_PATH="${dart-sass}/bin/sass"
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R dist/* $out/
runHook postInstall
'';
2024-12-27 18:36:59 +01:00
passthru = {
updateScript = nix-update-script { };
tests = {
inherit (nixosTests.homer) caddy nginx;
};
};
2024-11-07 19:42:50 +01:00
meta = with lib; {
description = "Very simple static homepage for your server";
2024-11-07 19:42:50 +01:00
homepage = "https://homer-demo.netlify.app/";
changelog = "https://github.com/bastienwirtz/homer/releases";
license = licenses.asl20;
maintainers = with maintainers; [
stunkymonkey
christoph-heiss
];
2024-11-07 19:42:50 +01:00
platforms = platforms.all;
};
}