Merge pull request #125118 from chkno/wine
wine: gecko 2.47.1 -> 2.47.2 and add tests
This commit is contained in:
commit
b3e7ddabfb
42
nixos/tests/wine.nix
Normal file
42
nixos/tests/wine.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ system ? builtins.currentSystem, pkgs ? import ../.. {
|
||||
inherit system;
|
||||
config = { };
|
||||
}, }:
|
||||
|
||||
let
|
||||
inherit (pkgs.lib) concatMapStrings listToAttrs;
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
|
||||
hello32 = "${pkgs.pkgsCross.mingw32.hello}/bin/hello.exe";
|
||||
hello64 = "${pkgs.pkgsCross.mingwW64.hello}/bin/hello.exe";
|
||||
|
||||
makeWineTest = packageSet: exes: variant: rec {
|
||||
name = "${packageSet}-${variant}";
|
||||
value = makeTest {
|
||||
inherit name;
|
||||
meta = with pkgs.lib.maintainers; { maintainers = [ chkno ]; };
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs."${packageSet}"."${variant}" ];
|
||||
virtualisation.diskSize = "800";
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
${concatMapStrings (exe: ''
|
||||
greeting = machine.succeed(
|
||||
"bash -c 'wine ${exe} 2> >(tee wine-stderr >&2)'"
|
||||
)
|
||||
assert 'Hello, world!' in greeting
|
||||
machine.fail(
|
||||
"fgrep 'Could not find Wine Gecko. HTML rendering will be disabled.' wine-stderr"
|
||||
)
|
||||
'') exes}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
variants = [ "base" "full" "minimal" "staging" "unstable" ];
|
||||
|
||||
in listToAttrs (map (makeWineTest "winePackages" [ hello32 ]) variants
|
||||
++ map (makeWineTest "wineWowPackages" [ hello32 hello64 ]) variants)
|
@ -19,14 +19,14 @@ in rec {
|
||||
|
||||
## see http://wiki.winehq.org/Gecko
|
||||
gecko32 = fetchurl rec {
|
||||
version = "2.47.1";
|
||||
version = "2.47.2";
|
||||
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86.msi";
|
||||
sha256 = "0ld03pjm65xkpgqkvfsmk6h9krjsqbgxw4b8rvl2fj20j8l0w2zh";
|
||||
sha256 = "07d6nrk2g0614kvwdjym1wq21d2bwy3pscwikk80qhnd6rrww875";
|
||||
};
|
||||
gecko64 = fetchurl rec {
|
||||
version = "2.47.1";
|
||||
version = "2.47.2";
|
||||
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86_64.msi";
|
||||
sha256 = "0jj7azmpy07319238g52a8m4nkdwj9g010i355ykxnl8m5wjwcb9";
|
||||
sha256 = "0iffhvdawc499nbn4k99k33cr7g8sdfcvq8k3z1g6gw24h87d5h5";
|
||||
};
|
||||
|
||||
## see http://wiki.winehq.org/Mono
|
||||
|
Loading…
Reference in New Issue
Block a user