From 58ff402b40ec37f90c093e7b3466afc401f4bba7 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Mon, 19 Nov 2018 19:26:52 +0000 Subject: [PATCH] pkgs/test/nixos-functions: use dummy versioning With this OfBorg and similar tools won't report this derivation as changed every single time. --- pkgs/test/nixos-functions/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/test/nixos-functions/default.nix b/pkgs/test/nixos-functions/default.nix index c8f7122006f7..6dee0a27a79a 100644 --- a/pkgs/test/nixos-functions/default.nix +++ b/pkgs/test/nixos-functions/default.nix @@ -11,10 +11,17 @@ To run this test: */ { pkgs, lib, stdenv, ... }: -lib.optionalAttrs stdenv.hostPlatform.isLinux ( +let + dummyVersioning = { + revision = "test"; + versionSuffix = "test"; + label = "test"; + }; +in lib.optionalAttrs stdenv.hostPlatform.isLinux ( pkgs.recurseIntoAttrs { nixos-test = (pkgs.nixos { + system.nixos = dummyVersioning; boot.loader.grub.enable = false; fileSystems."/".device = "/dev/null"; }).toplevel; @@ -22,6 +29,7 @@ lib.optionalAttrs stdenv.hostPlatform.isLinux ( nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: { name = "nixosTest-test"; machine = { pkgs, ... }: { + system.nixos = dummyVersioning; environment.systemPackages = [ pkgs.hello ]; }; testScript = ''