homebridge: init at 1.11.0

authored by Frank Moda and committed by Masum Reza 0f1a6033 9fcff88a

+37
+37
pkgs/by-name/ho/homebridge/package.nix
··· 1 + { 2 + lib, 3 + buildNpmPackage, 4 + fetchFromGitHub, 5 + jq, 6 + }: 7 + 8 + buildNpmPackage (finalAttrs: { 9 + pname = "homebridge"; 10 + version = "1.11.0"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "homebridge"; 14 + repo = "homebridge"; 15 + tag = "v${finalAttrs.version}"; 16 + hash = "sha256-95wd3pVumz/KGZNjOHrSOUtI4vipeHRWK7D8e9Nzpyo="; 17 + }; 18 + 19 + npmDepsHash = "sha256-fcahrKJXvEMosLbcZY6x/hklmAy4Dyf65xNfFPa4OpU="; 20 + 21 + # Homebridge's clean phase attempts to install rimraf directly, which fails in nix builds 22 + # rimraf is already in the declared dependencies, so we just don't need to do it. 23 + # This will replace "npm install rimraf && rimraf lib/" with "rimraf lib/". 24 + preBuild = '' 25 + cat package.json | ${jq}/bin/jq '.scripts.clean = "rimraf lib/"' > package.json.tmp 26 + mv package.json.tmp package.json 27 + ''; 28 + 29 + meta = { 30 + description = "Lightweight emulator of iOS HomeKit API"; 31 + homepage = "https://github.com/homebridge/homebridge"; 32 + license = lib.licenses.asl20; 33 + mainProgram = "homebridge"; 34 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 35 + maintainers = with lib.maintainers; [ fmoda3 ]; 36 + }; 37 + })