tests: patched nixpkgs no longer needed
This commit is contained in:
parent
9537daee32
commit
436fbb08e8
1 changed files with 1 additions and 31 deletions
|
@ -3,40 +3,10 @@ let
|
||||||
inherit (self.inputs) nixos;
|
inherit (self.inputs) nixos;
|
||||||
inherit (self.nixosConfigurations.NixOS.config.lib) testModule specialArgs;
|
inherit (self.nixosConfigurations.NixOS.config.lib) testModule specialArgs;
|
||||||
|
|
||||||
# current release 20.09 does not support the specialArgs required for us
|
|
||||||
# to use tests as we would normally use hosts. Using the "testing-python.nix"
|
|
||||||
# from the override flake would build the test-vm from an unstable os
|
|
||||||
# different than the one our systems are running. Instead simply patch nixpkgs
|
|
||||||
# to include the updated version. This can be removed in the next release
|
|
||||||
patchedNixpkgs =
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "nixpkgs-patched";
|
|
||||||
|
|
||||||
src = nixos;
|
|
||||||
patches = [ ./0004-nixos-testing-Add-support-for-specialArgs.patch ];
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
dontFixup = true;
|
|
||||||
|
|
||||||
versionSuffix = "pre${
|
|
||||||
if nixos ? lastModified
|
|
||||||
then builtins.substring 0 8 (nixos.lastModifiedDate or nixos.lastModified)
|
|
||||||
else toString nixos.revCount}.${nixos.shortRev or "dirty"}";
|
|
||||||
|
|
||||||
configurePhase = ''
|
|
||||||
echo -n $VERSION_SUFFIX > .version-suffix
|
|
||||||
echo -n ${nixos.rev or nixos.shortRev or "dirty"} > .git-revision
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
cp -r $PWD $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mkTest =
|
mkTest =
|
||||||
let
|
let
|
||||||
nixosTesting =
|
nixosTesting =
|
||||||
(import "${patchedNixpkgs}/nixos/lib/testing-python.nix" {
|
(import "${nixos}/nixos/lib/testing-python.nix" {
|
||||||
inherit (pkgs.stdenv.hostPlatform) system;
|
inherit (pkgs.stdenv.hostPlatform) system;
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
Loading…
Reference in a new issue