From c83dbfae34e23009f997ff77276c0692c57065c0 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 1 Nov 2021 16:04:12 +0100 Subject: [PATCH] sfml: switch to fetchFromGitHub --- pkgs/development/libraries/sfml/default.nix | 40 +++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/sfml/default.nix b/pkgs/development/libraries/sfml/default.nix index 7ed5070ebb08..cc3fa2df97a0 100644 --- a/pkgs/development/libraries/sfml/default.nix +++ b/pkgs/development/libraries/sfml/default.nix @@ -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/";