about summary refs log tree commit diff
path: root/pkgs/applications/emulators/wibo/default.nix
blob: f34f8d6b2f0f7f320e1dde8c6b5bef1418e4a37a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, stdenv
, fetchFromGitHub
, fetchzip
, srcOnly
, cmake
, unzip
}:

stdenv.mkDerivation rec {
  pname = "wibo";
  version = "0.4.2";

  src = fetchFromGitHub {
    owner = "decompals";
    repo = "wibo";
    rev = version;
    hash = "sha256-oq/i0Hb2y5pwDEvaqSyC4+6LH1oUbvDZ/62l+V3S7Uk=";
  };

  nativeBuildInputs = [
    cmake
    unzip
  ];

  doCheck = false;
  # Test step from https://github.com/decompals/wibo/blob/main/.github/workflows/ci.yml
  checkPhase = let
    gc = srcOnly {
      name = "GC_WII_COMPILERS";
      src = fetchzip {
        url = "https://cdn.discordapp.com/attachments/727918646525165659/917185027656286218/GC_WII_COMPILERS.zip";
        hash = "sha256-o+UrmIbCsa74LxtLofT0DKrTRgT0qDK5/V7GsG2Zprc=";
        stripRoot = false;
      };
      meta.license = lib.licenses.unfree;
    };
  in lib.optionalString doCheck ''
    MWCIncludes=../test ./wibo ${gc}/GC/2.7/mwcceppc.exe -c ../test/test.c
    file test.o | grep "ELF 32-bit"
  '';

  meta = with lib; {
    description = "Quick-and-dirty wrapper to run 32-bit windows EXEs on linux";
    longDescription = ''
      A minimal, low-fuss wrapper that can run really simple command-line
      32-bit Windows binaries on Linux - with less faff and less dependencies
      than WINE.
    '';
    homepage = "https://github.com/decompals/WiBo";
    license = licenses.mit;
    maintainers = with maintainers; [ r-burns ];
    platforms = [ "i686-linux" ];
    mainProgram = "wibo";
  };
}