Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 doxygen, 7 zlib, 8}: 9 10let 11 generic = 12 version: sha256: 13 stdenv.mkDerivation rec { 14 pname = "physfs"; 15 inherit version; 16 17 src = fetchFromGitHub { 18 owner = "icculus"; 19 repo = "physfs"; 20 rev = "release-${version}"; 21 inherit sha256; 22 }; 23 24 patches = [ 25 (./. + "/dont-set-cmake-skip-rpath-${version}.patch") 26 ]; 27 28 nativeBuildInputs = [ 29 cmake 30 doxygen 31 ]; 32 33 buildInputs = [ zlib ]; 34 35 doInstallCheck = true; 36 37 installCheckPhase = '' 38 ./test_physfs --version 39 ''; 40 41 meta = with lib; { 42 homepage = "https://icculus.org/physfs/"; 43 description = "Library to provide abstract access to various archives"; 44 mainProgram = "test_physfs"; 45 changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}"; 46 license = licenses.zlib; 47 platforms = platforms.all; 48 }; 49 }; 50 51in 52{ 53 physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc="; 54 physfs = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw="; 55}