12 stdenv.mkDerivation (finalAttrs: {
16 src = fetchFromGitHub {
17 owner = "ladislav-zezula";
19 rev = "v${finalAttrs.version}";
20 hash = "sha256-8JDMqZ5BWslH4+Mfo5lnWTmD2QDaColwBOLzcuGZciY=";
32 ++ lib.optionals stdenv.hostPlatform.isDarwin [
33 darwin.apple_sdk.frameworks.Carbon
37 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
38 (lib.cmakeBool "WITH_LIBTOMCRYPT" true)
43 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
44 "-Wno-implicit-function-declaration"
49 substituteInPlace CMakeLists.txt \
50 --replace "FRAMEWORK DESTINATION /Library/Frameworks" "FRAMEWORK DESTINATION Library/Frameworks"
54 homepage = "https://github.com/ladislav-zezula/StormLib";
55 description = "Open-source project that can work with Blizzard MPQ archives";
56 license = lib.licenses.mit;
57 maintainers = with lib.maintainers; [ aanderse karolchmist ];
58 platforms = lib.platforms.all;
59 broken = stdenv.hostPlatform.isDarwin; # installation directory mismatch