forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / physfs / default.nix
blobe00be9c841f9d912110cc8f2dbea8c914211a772
1 { lib, stdenv, fetchFromGitHub, cmake, doxygen, zlib, Foundation }:
3 let
4   generic = version: sha256:
5   stdenv.mkDerivation rec {
6     pname = "physfs";
7     inherit version;
9     src = fetchFromGitHub {
10       owner = "icculus";
11       repo = "physfs";
12       rev = "release-${version}";
13       inherit sha256;
14     };
16     nativeBuildInputs = [ cmake doxygen ];
18     buildInputs = [ zlib ]
19       ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];
21     doInstallCheck = true;
23     installCheckPhase = ''
24       ./test_physfs --version
25     '';
27     meta = with lib; {
28       homepage = "https://icculus.org/physfs/";
29       description = "Library to provide abstract access to various archives";
30       mainProgram = "test_physfs";
31       changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}";
32       license = licenses.zlib;
33       platforms = platforms.all;
34     };
35   };
37 in {
38   physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc=";
39   physfs   = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw=";