Files
nixpkgs/pkgs/by-name/ho/homebridge/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

38 lines
1.1 KiB
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
jq,
}:
buildNpmPackage (finalAttrs: {
pname = "homebridge";
version = "1.11.0";
src = fetchFromGitHub {
owner = "homebridge";
repo = "homebridge";
tag = "v${finalAttrs.version}";
hash = "sha256-95wd3pVumz/KGZNjOHrSOUtI4vipeHRWK7D8e9Nzpyo=";
};
npmDepsHash = "sha256-fcahrKJXvEMosLbcZY6x/hklmAy4Dyf65xNfFPa4OpU=";
# Homebridge's clean phase attempts to install rimraf directly, which fails in nix builds
# rimraf is already in the declared dependencies, so we just don't need to do it.
# This will replace "npm install rimraf && rimraf lib/" with "rimraf lib/".
preBuild = ''
cat package.json | ${jq}/bin/jq '.scripts.clean = "rimraf lib/"' > package.json.tmp
mv package.json.tmp package.json
'';
meta = {
description = "Lightweight emulator of iOS HomeKit API";
homepage = "https://github.com/homebridge/homebridge";
license = lib.licenses.asl20;
mainProgram = "homebridge";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [ fmoda3 ];
};
})