From 018175ecab4555d7042f8d743445c797f4a27d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Thu, 30 Nov 2023 11:51:37 +0100 Subject: [PATCH] netbox: Inherit gunicorn from the package I was using a 23.11 package on a NixOS 23.05 system and this caused the python that was used in gunicorn to differ from the python the postgres lib was linked against. --- nixos/modules/services/web-apps/netbox.nix | 2 +- pkgs/servers/web-apps/netbox/generic.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index 3b9434e3d345..88d40b3abc52 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -317,7 +317,7 @@ in { serviceConfig = defaultServiceConfig // { ExecStart = '' - ${pkgs.python3Packages.gunicorn}/bin/gunicorn netbox.wsgi \ + ${pkg.gunicorn}/bin/gunicorn netbox.wsgi \ --bind ${cfg.listenAddress}:${toString cfg.port} \ --pythonpath ${pkg}/opt/netbox/netbox ''; diff --git a/pkgs/servers/web-apps/netbox/generic.nix b/pkgs/servers/web-apps/netbox/generic.nix index afd02d798535..ec544b1e8772 100644 --- a/pkgs/servers/web-apps/netbox/generic.nix +++ b/pkgs/servers/web-apps/netbox/generic.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , python3 , version , hash @@ -94,6 +93,7 @@ passthru = { # PYTHONPATH of all dependencies used by the package pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs; + gunicorn = python3.pkgs.gunicorn; inherit tests; };