Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / physfs / default.nix
blob28b81867d20369cc5a20094907361144886a997a
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.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       changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}";
31       license = licenses.zlib;
32       platforms = platforms.all;
33     };
34   };
36 in {
37   physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc=";
38   physfs   = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw=";