Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, doxygen, zlib, Foundation }:
2
3let
4 generic = version: sha256:
5 stdenv.mkDerivation rec {
6 pname = "physfs";
7 inherit version;
8
9 src = fetchFromGitHub {
10 owner = "icculus";
11 repo = "physfs";
12 rev = "release-${version}";
13 inherit sha256;
14 };
15
16 nativeBuildInputs = [ cmake doxygen ];
17
18 buildInputs = [ zlib ]
19 ++ lib.optionals stdenv.isDarwin [ Foundation ];
20
21 doInstallCheck = true;
22
23 installCheckPhase = ''
24 ./test_physfs --version
25 '';
26
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 };
35
36in {
37 physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc=";
38 physfs = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw=";
39}