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