From ec28d4ab143159aacf3b1aa5929cb0509742df34 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 18 Aug 2019 22:16:48 -0400 Subject: [PATCH] directfb: use source from GitHub as tarball is no longer available This has the side effect of fixing the build on ARM, because some required files were missing from the tarball. --- .../libraries/directfb/default.nix | 41 ++++++++----------- .../libraries/directfb/default.upstream | 3 -- 2 files changed, 18 insertions(+), 26 deletions(-) delete mode 100644 pkgs/development/libraries/directfb/default.upstream diff --git a/pkgs/development/libraries/directfb/default.nix b/pkgs/development/libraries/directfb/default.nix index 3d831efbcb7d..f7545bb03d56 100644 --- a/pkgs/development/libraries/directfb/default.nix +++ b/pkgs/development/libraries/directfb/default.nix @@ -1,31 +1,29 @@ -{ stdenv, fetchurl, pkgconfig, perl, zlib, libjpeg, freetype, libpng, giflib +{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, pkgconfig, flux, zlib +, libjpeg, freetype, libpng, giflib , enableX11 ? true, xorg , enableSDL ? true, SDL }: -let s = -rec { - version = "1.7.7"; - name="directfb-${version}"; - sha256 = "18r7h0pwbyyk8z3pgdv77nmma8lvr1si9gl1ghxgxf1ivhwcd1dp"; - url="http://directfb.org/downloads/Core/DirectFB-1.7/DirectFB-${version}.tar.gz"; -} -; in -stdenv.mkDerivation { - inherit (s) name; - src = fetchurl { - inherit (s) url sha256; +stdenv.mkDerivation rec { + pname = "directfb"; + version = "1.7.7"; + + src = fetchFromGitHub { + owner = "deniskropp"; + repo = "DirectFB"; + rev = "DIRECTFB_${lib.replaceStrings ["."] ["_"] version}"; + sha256 = "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y"; }; - nativeBuildInputs = [ perl pkgconfig ]; + nativeBuildInputs = [ autoreconfHook perl pkgconfig flux ]; buildInputs = [ zlib libjpeg freetype giflib libpng ] - ++ stdenv.lib.optional enableSDL SDL - ++ stdenv.lib.optionals enableX11 (with xorg; [ + ++ lib.optional enableSDL SDL + ++ lib.optionals enableX11 (with xorg; [ xorgproto libX11 libXext libXrender ]); - NIX_LDFLAGS="-lgcc_s"; + NIX_LDFLAGS = "-lgcc_s"; configureFlags = [ "--enable-sdl" @@ -35,14 +33,11 @@ stdenv.mkDerivation { "--enable-fbdev" "--enable-mmx" "--enable-sse" - #"--enable-sysfs" # not recognized "--with-software" "--with-smooth-scaling" - ] ++ stdenv.lib.optionals enableX11 [ - "--enable-x11" - ]; + ] ++ lib.optional enableX11 "--enable-x11"; - meta = with stdenv.lib; { + meta = with lib; { description = "Graphics and input library designed with embedded systems in mind"; longDescription = '' DirectFB is a thin library that provides hardware graphics acceleration, @@ -54,7 +49,7 @@ stdenv.mkDerivation { power to embedded systems and sets a new standard for graphics under Linux. ''; - homepage = http://directfb.org/; + homepage = "https://github.com/deniskropp/DirectFB"; license = licenses.lgpl21; platforms = platforms.linux; maintainers = [ maintainers.bjornfor ]; diff --git a/pkgs/development/libraries/directfb/default.upstream b/pkgs/development/libraries/directfb/default.upstream deleted file mode 100644 index ef4ed8e490d1..000000000000 --- a/pkgs/development/libraries/directfb/default.upstream +++ /dev/null @@ -1,3 +0,0 @@ -url 'http://directfb.org/index.php?path=Main%2FDownloads' -version_link 'DirectFB-[0-9]' -minimize_overwrite