mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
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
@ -74,9 +74,9 @@ in {
|
||||
|
||||
package = lib.mkOption {
|
||||
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 ''
|
||||
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 ''
|
||||
NetBox package to use.
|
||||
|
@ -529,7 +529,7 @@ in {
|
||||
netdata = handleTest ./netdata.nix {};
|
||||
networking.networkd = handleTest ./networking.nix { networkd = true; };
|
||||
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-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
|
||||
# TODO: put in networking.nix after the test becomes more complete
|
||||
|
@ -1,10 +1,11 @@
|
||||
import ../make-test-python.nix ({ lib, pkgs, ... }: let
|
||||
oldNetbox = pkgs.netbox_3_3;
|
||||
newNetbox = pkgs.netbox_3_5;
|
||||
in {
|
||||
name = "netbox-upgrade";
|
||||
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ minijackson ];
|
||||
maintainers = [ minijackson raitobezarius ];
|
||||
};
|
||||
|
||||
nodes.machine = { config, ... }: {
|
||||
@ -32,7 +33,7 @@ in {
|
||||
|
||||
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, ... }:
|
||||
@ -43,7 +44,7 @@ in {
|
||||
(lib.concatStringsSep ".")
|
||||
];
|
||||
oldApiVersion = apiVersion oldNetbox.version;
|
||||
newApiVersion = apiVersion pkgs.netbox.version;
|
||||
newApiVersion = apiVersion newNetbox.version;
|
||||
in
|
||||
''
|
||||
start_all()
|
||||
|
@ -2,7 +2,9 @@
|
||||
let
|
||||
generic = import ./generic.nix;
|
||||
in
|
||||
{
|
||||
lib.fix (self: {
|
||||
netbox = self.netbox_3_5;
|
||||
|
||||
netbox_3_3 = callPackage generic {
|
||||
version = "3.3.10";
|
||||
hash = "sha256-MeOfTU5IxNDoUh7FyvwAQNRC/CE0R6p40WnlF+3RuxA=";
|
||||
@ -25,7 +27,7 @@ in
|
||||
eol = true;
|
||||
};
|
||||
|
||||
netbox = callPackage generic {
|
||||
netbox_3_5 = callPackage generic {
|
||||
version = "3.5.9";
|
||||
hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs=";
|
||||
extraPatches = [
|
||||
@ -33,9 +35,10 @@ in
|
||||
./config.patch
|
||||
];
|
||||
tests = {
|
||||
inherit (nixosTests) netbox netbox-upgrade;
|
||||
netbox = nixosTests.netbox_3_5;
|
||||
inherit (nixosTests) netbox-upgrade;
|
||||
};
|
||||
|
||||
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -11073,7 +11073,7 @@ with pkgs;
|
||||
netbootxyz-efi = callPackage ../tools/misc/netbootxyz-efi { };
|
||||
|
||||
inherit (callPackage ../servers/web-apps/netbox { })
|
||||
netbox_3_3 netbox;
|
||||
netbox netbox_3_3 netbox_3_5;
|
||||
|
||||
netbox2netshot = callPackage ../tools/admin/netbox2netshot { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user