2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, doxygen, darwin
|
2018-01-13 05:57:43 +00:00
|
|
|
, zlib }:
|
2009-11-06 19:25:45 +00:00
|
|
|
|
2018-01-13 05:57:43 +00:00
|
|
|
let
|
|
|
|
generic = version: sha256:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "physfs";
|
|
|
|
inherit version;
|
2009-11-06 19:25:45 +00:00
|
|
|
|
2018-01-13 05:57:43 +00:00
|
|
|
src = fetchurl {
|
2019-08-13 21:52:01 +00:00
|
|
|
url = "${meta.homepage}/downloads/${pname}-${version}.tar.bz2";
|
2018-01-13 05:57:43 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake doxygen ];
|
|
|
|
|
2020-12-20 04:20:00 +00:00
|
|
|
buildInputs = [ zlib ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Foundation ];
|
2009-11-06 19:25:45 +00:00
|
|
|
|
2018-01-13 05:57:43 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed s,-Werror,, -i CMakeLists.txt
|
|
|
|
'';
|
2012-03-08 13:34:42 +00:00
|
|
|
|
2018-01-13 05:57:43 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
./test_physfs --version
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://icculus.org/physfs/";
|
2018-01-13 05:57:43 +00:00
|
|
|
description = "Library to provide abstract access to various archives";
|
|
|
|
license = licenses.free;
|
2020-12-20 04:20:00 +00:00
|
|
|
platforms = platforms.unix;
|
2018-01-13 05:57:43 +00:00
|
|
|
};
|
2009-11-06 19:25:45 +00:00
|
|
|
};
|
2018-01-13 05:57:43 +00:00
|
|
|
|
|
|
|
in {
|
|
|
|
physfs_2 = generic "2.0.3" "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na";
|
2019-03-20 00:56:05 +00:00
|
|
|
physfs = generic "3.0.2" "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h";
|
2009-11-06 19:25:45 +00:00
|
|
|
}
|