Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
82 lines
1.7 KiB
Nix
82 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchFromGitHub,
|
|
pnpm_10,
|
|
nodejs,
|
|
dart-sass,
|
|
nix-update-script,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "homer";
|
|
version = "25.09.1";
|
|
src = fetchFromGitHub {
|
|
owner = "bastienwirtz";
|
|
repo = "homer";
|
|
rev = "v${version}";
|
|
hash = "sha256-MwDDnfp21MoQ9hh0+cjUo+sc+u69rx1K9ATbBB6RX78=";
|
|
};
|
|
|
|
pnpmDeps = pnpm_10.fetchDeps {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
|
|
;
|
|
fetcherVersion = 2;
|
|
hash = "sha256-2cozIe70PGo1WRUeWrY8W1B6U2QYLbWYcwN5WllRwkg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
nodejs
|
|
dart-sass
|
|
pnpm_10.configHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
# force the sass npm dependency to use our own sass binary instead of the bundled one
|
|
substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \
|
|
--replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["${lib.getExe dart-sass}"];'
|
|
pnpm build
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
cp -R dist/* $out/
|
|
|
|
# Remove sample/demo files from output
|
|
rm -f $out/assets/*.yml.dist
|
|
rm -f $out/assets/*.css.sample
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests = {
|
|
inherit (nixosTests.homer) caddy nginx;
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Very simple static homepage for your server";
|
|
homepage = "https://github.com/bastienwirtz/homer";
|
|
changelog = "https://github.com/bastienwirtz/homer/releases";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [
|
|
stunkymonkey
|
|
christoph-heiss
|
|
];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|