From 6e175d13716587707116f194553b9816836791bc Mon Sep 17 00:00:00 2001 From: Bignaux Ronan Date: Fri, 24 May 2019 02:17:26 +0200 Subject: [PATCH] xcpc: move libsdk and lesstiff as optional --- pkgs/misc/emulators/xcpc/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/emulators/xcpc/default.nix b/pkgs/misc/emulators/xcpc/default.nix index 5eb6e3b160ef..3806d25e5d00 100644 --- a/pkgs/misc/emulators/xcpc/default.nix +++ b/pkgs/misc/emulators/xcpc/default.nix @@ -1,20 +1,27 @@ -{ stdenv, fetchurl, libdsk, pkgconfig, glib, libXaw, libX11, libXext, lesstif }: +{ stdenv, fetchurl, pkgconfig, glib, libXaw, libX11, libXext + , libDSKSupport ? true, libdsk + , motifSupport ? false, lesstif +}: +with stdenv.lib; stdenv.mkDerivation rec { version = "20070122"; - name = "xcpc-${version}"; + pname = "xcpc"; src = fetchurl { - url = "mirror://sourceforge/xcpc/${name}.tar.gz"; + url = "mirror://sourceforge/xcpc/${pname}-${version}.tar.gz"; sha256 = "0hxsbhmyzyyrlidgg0q8izw55q0z40xrynw5a1c3frdnihj9jf7n"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib libdsk libXaw libX11 libXext lesstif ]; - meta = with stdenv.lib; { + buildInputs = [ glib libdsk libXaw libX11 libXext ] + ++ optional libDSKSupport libdsk + ++ optional motifSupport lesstif; + + meta = { description = "A portable Amstrad CPC 464/664/6128 emulator written in C"; - homepage = https://www.xcpc-emulator.net; + homepage = "https://www.xcpc-emulator.net"; license = licenses.gpl2Plus; maintainers = [ maintainers.genesis ]; platforms = platforms.linux;