Merge pull request #31254 from LumiGuide/graphite-python-overrides
graphite: override django and django_tagging
This commit is contained in:
commit
dd851a8d75
@ -467,7 +467,15 @@ in {
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf cfg.web.enable {
|
||||
(mkIf cfg.web.enable (let
|
||||
python27' = pkgs.python27.override {
|
||||
packageOverrides = self: super: {
|
||||
django = self.django_1_8;
|
||||
django_tagging = self.django_tagging_0_4_3;
|
||||
};
|
||||
};
|
||||
pythonPackages = python27'.pkgs;
|
||||
in {
|
||||
systemd.services.graphiteWeb = {
|
||||
description = "Graphite Web Interface";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -477,8 +485,8 @@ in {
|
||||
PYTHONPATH = let
|
||||
penv = pkgs.python.buildEnv.override {
|
||||
extraLibs = [
|
||||
pkgs.python27Packages.graphite_web
|
||||
pkgs.python27Packages.pysqlite
|
||||
pythonPackages.graphite_web
|
||||
pythonPackages.pysqlite
|
||||
];
|
||||
};
|
||||
penvPack = "${penv}/${pkgs.python.sitePackages}";
|
||||
@ -516,17 +524,17 @@ in {
|
||||
fi
|
||||
|
||||
# Only collect static files when graphite_web changes.
|
||||
if ! [ "${dataDir}/current_graphite_web" -ef "${pkgs.python27Packages.graphite_web}" ]; then
|
||||
if ! [ "${dataDir}/current_graphite_web" -ef "${pythonPackages.graphite_web}" ]; then
|
||||
mkdir -p ${staticDir}
|
||||
${pkgs.pythonPackages.django_1_8}/bin/django-admin.py collectstatic --noinput --clear
|
||||
chown -R graphite:graphite ${staticDir}
|
||||
ln -sfT "${pkgs.python27Packages.graphite_web}" "${dataDir}/current_graphite_web"
|
||||
ln -sfT "${pythonPackages.graphite_web}" "${dataDir}/current_graphite_web"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.python27Packages.graphite_web ];
|
||||
})
|
||||
environment.systemPackages = [ pythonPackages.graphite_web ];
|
||||
}))
|
||||
|
||||
(mkIf cfg.api.enable {
|
||||
systemd.services.graphiteApi = {
|
||||
|
@ -8071,14 +8071,17 @@ in {
|
||||
|
||||
django_tagging = callPackage ../development/python-modules/django_tagging { };
|
||||
|
||||
django_tagging_0_4_3 = self.django_tagging.overrideAttrs (attrs: rec {
|
||||
django_tagging_0_4_3 = if
|
||||
self.django != self.django_1_8
|
||||
then throw "django_tagging_0_4_3 should be build with django_1_8"
|
||||
else (callPackage ../development/python-modules/django_tagging {}).overrideAttrs (attrs: rec {
|
||||
name = "django-tagging-0.4.3";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://pypi/d/django-tagging/${name}.tar.gz";
|
||||
sha256 = "0617azpmp6jpg3d88v2ir97qrc9aqcs2s9gyvv9bgf2cp55khxhs";
|
||||
};
|
||||
propagatedBuildInputs = with self; [ django_1_8 ];
|
||||
propagatedBuildInputs = with self; [ django ];
|
||||
});
|
||||
|
||||
django_classytags = buildPythonPackage rec {
|
||||
@ -22794,7 +22797,11 @@ EOF
|
||||
};
|
||||
};
|
||||
|
||||
graphite_web = buildPythonPackage rec {
|
||||
graphite_web = if
|
||||
self.django != self.django_1_8
|
||||
|| self.django_tagging != self.django_tagging_0_4_3
|
||||
then throw "graphite_web should be build with django_1_8 and django_tagging_0_4_3"
|
||||
else buildPythonPackage rec {
|
||||
name = "graphite-web-${version}";
|
||||
disabled = isPy3k;
|
||||
version = graphiteVersion;
|
||||
@ -22805,7 +22812,7 @@ EOF
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [
|
||||
django_1_8 django_tagging_0_4_3 whisper pycairo cairocffi
|
||||
django django_tagging whisper pycairo cairocffi
|
||||
ldap memcached pytz urllib3 scandir
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user