diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps/netbox')
-rw-r--r-- | nixpkgs/pkgs/servers/web-apps/netbox/default.nix | 37 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/web-apps/netbox/generic.nix | 33 |
2 files changed, 22 insertions, 48 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/netbox/default.nix b/nixpkgs/pkgs/servers/web-apps/netbox/default.nix index 433b974eb411..ab648d7daa7b 100644 --- a/nixpkgs/pkgs/servers/web-apps/netbox/default.nix +++ b/nixpkgs/pkgs/servers/web-apps/netbox/default.nix @@ -1,41 +1,38 @@ -{ lib, nixosTests, callPackage, fetchpatch }: +{ lib, nixosTests, callPackage, }: let generic = import ./generic.nix; in -{ - netbox_3_3 = callPackage generic { - version = "3.3.10"; - hash = "sha256-MeOfTU5IxNDoUh7FyvwAQNRC/CE0R6p40WnlF+3RuxA="; +lib.fix (self: { + netbox = self.netbox_3_6; + + netbox_3_5 = callPackage generic { + version = "3.5.9"; + hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs="; extraPatches = [ # Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL - ./config_3_3.patch - ./graphql-3_2_0.patch - # fix compatibility ith django 4.1 - (fetchpatch { - url = "https://github.com/netbox-community/netbox/pull/10341/commits/ce6bf9e5c1bc08edc80f6ea1e55cf1318ae6e14b.patch"; - sha256 = "sha256-aCPQp6k7Zwga29euASAd+f13hIcZnIUu3RPAzNPqgxc="; - }) + ./config.patch ]; - tests = { - netbox = nixosTests.netbox_3_3; + netbox = nixosTests.netbox_3_5; inherit (nixosTests) netbox-upgrade; }; - maintainers = with lib.maintainers; [ n0emis raitobezarius ]; + + maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ]; eol = true; }; - netbox = callPackage generic { - version = "3.5.9"; - hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs="; + netbox_3_6 = callPackage generic { + version = "3.6.3"; + hash = "sha256-8Xir2Gvwh2cllHu5qVAzumuH0lknMMtjd8BuFuuf9A0="; extraPatches = [ # Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL ./config.patch ]; tests = { - inherit (nixosTests) netbox netbox-upgrade; + netbox = nixosTests.netbox_3_6; + inherit (nixosTests) netbox-upgrade; }; maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ]; }; -} +}) diff --git a/nixpkgs/pkgs/servers/web-apps/netbox/generic.nix b/nixpkgs/pkgs/servers/web-apps/netbox/generic.nix index 179ef71b702d..afd02d798535 100644 --- a/nixpkgs/pkgs/servers/web-apps/netbox/generic.nix +++ b/nixpkgs/pkgs/servers/web-apps/netbox/generic.nix @@ -11,32 +11,9 @@ , eol ? false }: let - py = python3 // { - pkgs = python3.pkgs.overrideScope (self: super: { - django = super.django_4; - drf-nested-routers = super.drf-nested-routers.overridePythonAttrs (_oldAttrs: { - patches = [ - # all for django 4 compat - (fetchpatch { - url = "https://github.com/alanjds/drf-nested-routers/commit/59764cc356f7f593422b26845a9dfac0ad196120.diff"; - hash = "sha256-mq3vLHzQlGl2EReJ5mVVQMMcYgGIVt/T+qi1STtQ0aI="; - }) - (fetchpatch { - url = "https://github.com/alanjds/drf-nested-routers/commit/723a5729dd2ffcb66fe315f229789ca454986fa4.diff"; - hash = "sha256-UCbBjwlidqsJ9vEEWlGzfqqMOr0xuB2TAaUxHsLzFfU="; - }) - (fetchpatch { - url = "https://github.com/alanjds/drf-nested-routers/commit/38e49eb73759bc7dcaaa9166169590f5315e1278.diff"; - hash = "sha256-IW4BLhHHhXDUZqHaXg46qWoQ89pMXv0ZxKjOCTnDcI0="; - }) - ]; - }); - }); - }; - - extraBuildInputs = plugins py.pkgs; + extraBuildInputs = plugins python3.pkgs; in - py.pkgs.buildPythonApplication rec { + python3.pkgs.buildPythonApplication rec { pname = "netbox"; inherit version; @@ -51,7 +28,7 @@ patches = extraPatches; - propagatedBuildInputs = with py.pkgs; [ + propagatedBuildInputs = with python3.pkgs; [ bleach boto3 django_4 @@ -90,7 +67,7 @@ jsonschema ] ++ extraBuildInputs; - buildInputs = with py.pkgs; [ + buildInputs = with python3.pkgs; [ mkdocs-material mkdocs-material-extensions mkdocstrings @@ -98,7 +75,7 @@ ]; nativeBuildInputs = [ - py.pkgs.mkdocs + python3.pkgs.mkdocs ]; postBuild = '' |