mopidy-iris: build from source, turn off Google Analytics per default (#520209)

This commit is contained in:
Sandro
2026-05-17 22:48:33 +00:00
committed by GitHub
+29 -5
View File
@@ -1,8 +1,11 @@
{
lib,
pythonPackages,
fetchPypi,
fetchFromGitHub,
fetchNpmDeps,
mopidy,
nodejs,
npmHooks,
}:
pythonPackages.buildPythonApplication (finalAttrs: {
@@ -10,12 +13,33 @@ pythonPackages.buildPythonApplication (finalAttrs: {
version = "3.70.0";
pyproject = true;
src = fetchPypi {
pname = "mopidy_iris";
inherit (finalAttrs) version;
hash = "sha256-md/1blTTtjiAAb/jiLE2EfiSlIUwEga8U7OiuKa466k=";
src = fetchFromGitHub {
owner = "jaedb";
repo = "Iris";
tag = finalAttrs.version;
hash = "sha256-Fc0LktN8pCRnrvk9uudXu10J3XfrRbdGlcDKXFNQzmQ=";
};
postPatch = ''
# turn off Google Analytics per default
substituteInPlace src/js/store/index.js \
--replace-fail 'allow_reporting: true' 'allow_reporting: false'
'';
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-aQHq80SLaOPOANYV+aDTWC/bxfc1it5iDeRJ8L5iuEU=";
};
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];
preBuild = ''
npm run prod
'';
build-system = [
pythonPackages.setuptools
];