1 { lib, stdenv, fetchFromGitHub, cmake, doxygen, zlib, Foundation }:
4 generic = version: sha256:
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
12 rev = "release-${version}";
16 nativeBuildInputs = [ cmake doxygen ];
18 buildInputs = [ zlib ]
19 ++ lib.optionals stdenv.isDarwin [ Foundation ];
21 doInstallCheck = true;
23 installCheckPhase = ''
24 ./test_physfs --version
28 homepage = "https://icculus.org/physfs/";
29 description = "Library to provide abstract access to various archives";
30 changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}";
31 license = licenses.zlib;
32 platforms = platforms.all;
37 physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc=";
38 physfs = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw=";