Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, bzip2, libtomcrypt, zlib, darwin }: 2 3stdenv.mkDerivation rec { 4 pname = "StormLib"; 5 version = "9.22"; 6 7 src = fetchFromGitHub { 8 owner = "ladislav-zezula"; 9 repo = "StormLib"; 10 rev = "v${version}"; 11 sha256 = "1rcdl6ryrr8fss5z5qlpl4prrw8xpbcdgajg2hpp0i7fpk21ymcc"; 12 }; 13 14 postPatch = '' 15 substituteInPlace CMakeLists.txt \ 16 --replace "FRAMEWORK DESTINATION /Library/Frameworks" "FRAMEWORK DESTINATION Library/Frameworks" 17 ''; 18 19 cmakeFlags = [ 20 "-DBUILD_SHARED_LIBS=ON" 21 "-DWITH_LIBTOMCRYPT=ON" 22 ]; 23 24 nativeBuildInputs = [ cmake ]; 25 buildInputs = [ bzip2 libtomcrypt zlib ] ++ 26 lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Carbon ]; 27 28 meta = with lib; { 29 homepage = "https://github.com/ladislav-zezula/StormLib"; 30 license = licenses.mit; 31 description = "An open-source project that can work with Blizzard MPQ archives"; 32 platforms = platforms.all; 33 maintainers = with maintainers; [ aanderse karolchmist ]; 34 }; 35}