netbox_3_5: introduce alias
clears up ambiguity use that alias in tests Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
397b1733f4
commit
6c7e768420
5 changed files with 15 additions and 11 deletions
|
@ -74,9 +74,9 @@ in {
|
||||||
|
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = if lib.versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
|
default = if lib.versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox_3_5 else pkgs.netbox_3_3;
|
||||||
defaultText = lib.literalExpression ''
|
defaultText = lib.literalExpression ''
|
||||||
if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
|
if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox_3_5 else pkgs.netbox_3_3;
|
||||||
'';
|
'';
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
NetBox package to use.
|
NetBox package to use.
|
||||||
|
|
|
@ -529,7 +529,7 @@ in {
|
||||||
netdata = handleTest ./netdata.nix {};
|
netdata = handleTest ./netdata.nix {};
|
||||||
networking.networkd = handleTest ./networking.nix { networkd = true; };
|
networking.networkd = handleTest ./networking.nix { networkd = true; };
|
||||||
networking.scripted = handleTest ./networking.nix { networkd = false; };
|
networking.scripted = handleTest ./networking.nix { networkd = false; };
|
||||||
netbox = handleTest ./web-apps/netbox.nix { inherit (pkgs) netbox; };
|
netbox_3_5 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_5; };
|
||||||
netbox_3_3 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_3; };
|
netbox_3_3 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_3; };
|
||||||
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
|
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
|
||||||
# TODO: put in networking.nix after the test becomes more complete
|
# TODO: put in networking.nix after the test becomes more complete
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import ../make-test-python.nix ({ lib, pkgs, ... }: let
|
import ../make-test-python.nix ({ lib, pkgs, ... }: let
|
||||||
oldNetbox = pkgs.netbox_3_3;
|
oldNetbox = pkgs.netbox_3_3;
|
||||||
|
newNetbox = pkgs.netbox_3_5;
|
||||||
in {
|
in {
|
||||||
name = "netbox-upgrade";
|
name = "netbox-upgrade";
|
||||||
|
|
||||||
meta = with lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [ minijackson ];
|
maintainers = [ minijackson raitobezarius ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes.machine = { config, ... }: {
|
nodes.machine = { config, ... }: {
|
||||||
|
@ -32,7 +33,7 @@ in {
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
||||||
specialisation.upgrade.configuration.services.netbox.package = lib.mkForce pkgs.netbox;
|
specialisation.upgrade.configuration.services.netbox.package = lib.mkForce newNetbox;
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = { nodes, ... }:
|
testScript = { nodes, ... }:
|
||||||
|
@ -43,7 +44,7 @@ in {
|
||||||
(lib.concatStringsSep ".")
|
(lib.concatStringsSep ".")
|
||||||
];
|
];
|
||||||
oldApiVersion = apiVersion oldNetbox.version;
|
oldApiVersion = apiVersion oldNetbox.version;
|
||||||
newApiVersion = apiVersion pkgs.netbox.version;
|
newApiVersion = apiVersion newNetbox.version;
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
start_all()
|
start_all()
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
let
|
let
|
||||||
generic = import ./generic.nix;
|
generic = import ./generic.nix;
|
||||||
in
|
in
|
||||||
{
|
lib.fix (self: {
|
||||||
|
netbox = self.netbox_3_5;
|
||||||
|
|
||||||
netbox_3_3 = callPackage generic {
|
netbox_3_3 = callPackage generic {
|
||||||
version = "3.3.10";
|
version = "3.3.10";
|
||||||
hash = "sha256-MeOfTU5IxNDoUh7FyvwAQNRC/CE0R6p40WnlF+3RuxA=";
|
hash = "sha256-MeOfTU5IxNDoUh7FyvwAQNRC/CE0R6p40WnlF+3RuxA=";
|
||||||
|
@ -25,7 +27,7 @@ in
|
||||||
eol = true;
|
eol = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
netbox = callPackage generic {
|
netbox_3_5 = callPackage generic {
|
||||||
version = "3.5.9";
|
version = "3.5.9";
|
||||||
hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs=";
|
hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs=";
|
||||||
extraPatches = [
|
extraPatches = [
|
||||||
|
@ -33,9 +35,10 @@ in
|
||||||
./config.patch
|
./config.patch
|
||||||
];
|
];
|
||||||
tests = {
|
tests = {
|
||||||
inherit (nixosTests) netbox netbox-upgrade;
|
netbox = nixosTests.netbox_3_5;
|
||||||
|
inherit (nixosTests) netbox-upgrade;
|
||||||
};
|
};
|
||||||
|
|
||||||
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
|
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -11073,7 +11073,7 @@ with pkgs;
|
||||||
netbootxyz-efi = callPackage ../tools/misc/netbootxyz-efi { };
|
netbootxyz-efi = callPackage ../tools/misc/netbootxyz-efi { };
|
||||||
|
|
||||||
inherit (callPackage ../servers/web-apps/netbox { })
|
inherit (callPackage ../servers/web-apps/netbox { })
|
||||||
netbox_3_3 netbox;
|
netbox netbox_3_3 netbox_3_5;
|
||||||
|
|
||||||
netbox2netshot = callPackage ../tools/admin/netbox2netshot { };
|
netbox2netshot = callPackage ../tools/admin/netbox2netshot { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue