1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchzip,
6 srcOnly,
7 cmake,
8 unzip,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "wibo";
13 version = "0.6.14";
14
15 src = fetchFromGitHub {
16 owner = "decompals";
17 repo = "wibo";
18 rev = version;
19 hash = "sha256-6YcraHBFWmm8TBfuFHbM9jGvUm9KvTOplJrFSTQkt70=";
20 };
21
22 nativeBuildInputs = [
23 cmake
24 unzip
25 ];
26
27 doCheck = false;
28 # Test step from https://github.com/decompals/wibo/blob/main/.github/workflows/ci.yml
29 checkPhase =
30 let
31 gc = srcOnly {
32 name = "GC_WII_COMPILERS";
33 src = fetchzip {
34 url = "https://files.decomp.dev/compilers_20230715.zip";
35 hash = "sha256-IX3byvEUVJB6Rmc+NqO9ZNt1jl95nQpEIqxbHI+uUio=";
36 stripRoot = false;
37 };
38 meta.license = lib.licenses.unfree;
39 };
40 in
41 lib.optionalString doCheck ''
42 MWCIncludes=../test ./wibo ${gc}/GC/2.7/mwcceppc.exe -c ../test/test.c
43 file test.o | grep "ELF 32-bit"
44 '';
45
46 meta = with lib; {
47 description = "Quick-and-dirty wrapper to run 32-bit windows EXEs on linux";
48 longDescription = ''
49 A minimal, low-fuss wrapper that can run really simple command-line
50 32-bit Windows binaries on Linux - with less faff and less dependencies
51 than WINE.
52 '';
53 homepage = "https://github.com/decompals/WiBo";
54 license = licenses.mit;
55 maintainers = with maintainers; [ r-burns ];
56 platforms = [ "i686-linux" ];
57 mainProgram = "wibo";
58 };
59}