sfml: switch to fetchFromGitHub

This commit is contained in:
Felix Buehler 2021-11-01 16:04:12 +01:00
parent 512b6d19df
commit c83dbfae34

View File

@ -1,15 +1,33 @@
{ lib, stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL
{ lib
, stdenv
, fetchFromGitHub
, cmake
, libX11
, freetype
, libjpeg
, openal
, flac
, libvorbis
, glew
, libXrandr
, libXrender
, udev
, xcbutilimage
, IOKit
, Foundation
, AppKit
, OpenAL
}:
stdenv.mkDerivation rec {
pname = "sfml";
version = "2.5.1";
src = fetchzip {
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
sha256 = "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay";
src = fetchFromGitHub {
owner = "SFML";
repo = "SFML";
rev = version;
sha256 = "sha256-Xt2Ct4vV459AsSvJxQfwMsNs6iA5y3epT95pLWJGeSk=";
};
nativeBuildInputs = [ cmake ];
@ -18,10 +36,12 @@ stdenv.mkDerivation rec {
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
"-DSFML_BUILD_FRAMEWORKS=no"
"-DSFML_USE_SYSTEM_DEPS=yes" ];
cmakeFlags = [
"-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
"-DSFML_BUILD_FRAMEWORKS=no"
"-DSFML_USE_SYSTEM_DEPS=yes"
];
meta = with lib; {
homepage = "https://www.sfml-dev.org/";