Skip to content

Commit bf1a329

Browse files
committed
SDL_compat: add basic checkPhase
1 parent fb4b83f commit bf1a329

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

pkgs/by-name/sd/SDL_compat/package.nix

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,26 @@ stdenv.mkDerivation (finalAttrs: {
5959

6060
dontPatchELF = true; # don't strip rpath
6161

62-
cmakeFlags = [
63-
(lib.cmakeFeature "CMAKE_INSTALL_RPATH" (lib.makeLibraryPath [ sdl2-compat ]))
64-
];
62+
cmakeFlags =
63+
let
64+
rpath = lib.makeLibraryPath [ sdl2-compat ];
65+
in
66+
[
67+
(lib.cmakeFeature "CMAKE_INSTALL_RPATH" rpath)
68+
(lib.cmakeFeature "CMAKE_BUILD_RPATH" rpath)
69+
(lib.cmakeBool "SDL12TESTS" finalAttrs.finalPackage.doCheck)
70+
];
6571

6672
enableParallelBuilding = true;
6773

74+
# Darwin fails with "Critical error: required built-in appearance SystemAppearance not found"
75+
doCheck = !stdenv.hostPlatform.isDarwin;
76+
checkPhase = ''
77+
runHook preCheck
78+
./testver
79+
runHook postCheck
80+
'';
81+
6882
postInstall = ''
6983
# allow as a drop in replacement for SDL
7084
# Can be removed after treewide switch from pkg-config to pkgconf

0 commit comments

Comments
 (0)