2020-10-29 07:14:42 +00:00
|
|
|
{ stdenv, lib
|
|
|
|
, Carbon
|
|
|
|
, fetchzip
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
}:
|
2018-06-17 23:11:28 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-06-17 23:11:28 +01:00
|
|
|
name = "soil";
|
|
|
|
|
2020-10-29 07:14:42 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://web.archive.org/web/20200104042737id_/http://www.lonesock.net/files/soil.zip";
|
|
|
|
sha256 = "1c05nwbnfdgwaz8ywn7kg2xrcvrcbpdyhcfkkiiwk69zvil0pbgd";
|
2018-06-17 23:11:28 +01:00
|
|
|
};
|
|
|
|
|
2020-10-29 07:14:42 +00:00
|
|
|
buildInputs = if stdenv.hostPlatform.isDarwin then [
|
|
|
|
Carbon
|
|
|
|
] else [
|
|
|
|
libGL
|
|
|
|
libX11
|
|
|
|
];
|
2019-05-28 20:09:34 +01:00
|
|
|
|
2020-10-29 07:14:42 +00:00
|
|
|
buildPhase = ''
|
|
|
|
cd src
|
|
|
|
$CC $NIX_CFLAGS_COMPILE -c *.c
|
|
|
|
$AR rcs libSOIL.a *.o
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib $out/include/SOIL
|
|
|
|
cp libSOIL.a $out/lib/
|
|
|
|
cp SOIL.h $out/include/SOIL/
|
|
|
|
'';
|
2018-06-17 23:11:28 +01:00
|
|
|
|
2020-10-29 07:14:42 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple OpenGL Image Library";
|
2018-06-17 23:11:28 +01:00
|
|
|
longDescription = ''
|
|
|
|
SOIL is a tiny C library used primarily for uploading textures
|
|
|
|
into OpenGL.
|
|
|
|
'';
|
2020-10-29 07:14:42 +00:00
|
|
|
homepage = "https://www.lonesock.net/soil.html";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ r-burns ];
|
2018-06-17 23:11:28 +01:00
|
|
|
};
|
|
|
|
}
|