diff options
author | Ryan Burns <rtburns@protonmail.com> | 2020-10-29 00:14:42 -0700 |
---|---|---|
committer | Ryan Burns <rtburns@protonmail.com> | 2020-11-06 22:35:29 -0800 |
commit | 981c8bb5e24f25014c75cbe050dd16697ca68157 (patch) | |
tree | 83b73ec46fe05f72aa5a2ba506f583c14e33dce8 /pkgs/development/libraries/soil | |
parent | cb9fab88c31fd42e3630e817f7e97986abfd95bd (diff) |
soil: fix dead url, enable on darwin
Diffstat (limited to 'pkgs/development/libraries/soil')
-rw-r--r-- | pkgs/development/libraries/soil/default.nix | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/pkgs/development/libraries/soil/default.nix b/pkgs/development/libraries/soil/default.nix index cf0896170c179..dcec1c897b3b6 100644 --- a/pkgs/development/libraries/soil/default.nix +++ b/pkgs/development/libraries/soil/default.nix @@ -1,28 +1,45 @@ -{ stdenv, fetchurl, unzip, mesa, libX11, libGL }: +{ stdenv, lib +, Carbon +, fetchzip +, libGL +, libX11 +}: stdenv.mkDerivation { name = "soil"; - src = fetchurl { - url = "http://www.lonesock.net/files/soil.zip"; - sha256 = "00gpwp9dldzhsdhksjvmbhsd2ialraqbv6v6dpikdmpncj6mnc52"; + src = fetchzip { + url = "https://web.archive.org/web/20200104042737id_/http://www.lonesock.net/files/soil.zip"; + sha256 = "1c05nwbnfdgwaz8ywn7kg2xrcvrcbpdyhcfkkiiwk69zvil0pbgd"; }; - buildInputs = [ unzip mesa libGL libX11 ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ + Carbon + ] else [ + libGL + libX11 + ]; - sourceRoot = "Simple OpenGL Image Library/projects/makefile"; - preBuild = "mkdir obj"; - preInstall = "mkdir -p $out/lib $out/include"; - makeFlags = [ "LOCAL=$(out)" ]; + 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/ + ''; - meta = { - description = "Simple OpenGL Image Library"; + meta = with lib; { + description = "Simple OpenGL Image Library"; longDescription = '' SOIL is a tiny C library used primarily for uploading textures into OpenGL. ''; - homepage = "https://www.lonesock.net/soil.html"; - license = stdenv.lib.licenses.publicDomain; - platforms = stdenv.lib.platforms.linux; + homepage = "https://www.lonesock.net/soil.html"; + license = licenses.publicDomain; + platforms = platforms.unix; + maintainers = with maintainers; [ r-burns ]; }; } |