From d5dc7479c489d17e6dcacf081c0f1b5242d99bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 8 Jan 2023 11:25:01 +0100 Subject: Format using Alejandra --- pkgs/stardict/cz.nix | 7 ++- pkgs/stardict/de-cz.nix | 7 ++- pkgs/stardict/default.nix | 126 ++++++++++++++++++++++++++++------------------ pkgs/stardict/en-cz.nix | 7 ++- pkgs/stardict/wrapper.nix | 36 +++++++------ 5 files changed, 111 insertions(+), 72 deletions(-) (limited to 'pkgs/stardict') diff --git a/pkgs/stardict/cz.nix b/pkgs/stardict/cz.nix index 7b4eeb0..0ce4100 100644 --- a/pkgs/stardict/cz.nix +++ b/pkgs/stardict/cz.nix @@ -1,5 +1,8 @@ -{ lib, stdenvNoCC, fetchurl }: - +{ + lib, + stdenvNoCC, + fetchurl, +}: stdenvNoCC.mkDerivation rec { pname = "stardict-cz"; version = "20171101"; diff --git a/pkgs/stardict/de-cz.nix b/pkgs/stardict/de-cz.nix index 8ef3923..93f0744 100644 --- a/pkgs/stardict/de-cz.nix +++ b/pkgs/stardict/de-cz.nix @@ -1,5 +1,8 @@ -{ lib, stdenvNoCC, fetchurl }: - +{ + lib, + stdenvNoCC, + fetchurl, +}: stdenvNoCC.mkDerivation rec { pname = "stardict-de-cz"; version = "20200501"; diff --git a/pkgs/stardict/default.nix b/pkgs/stardict/default.nix index 9669c3d..cca761a 100644 --- a/pkgs/stardict/default.nix +++ b/pkgs/stardict/default.nix @@ -1,55 +1,81 @@ -{ lib, stdenv, fetchurl -, autoreconfHook, wrapGAppsHook -, pkg-config, automake, autoconf, libtool, intltool, gnome-doc-utils, libxslt -, gnome2, gtk2, libxml2, enchant , mariadb-connector-c, pcre -, speech-tools, speech-toolsDisable ? false -, espeak, espeakDisable ? false +{ + lib, + stdenv, + fetchurl, + autoreconfHook, + wrapGAppsHook, + pkg-config, + automake, + autoconf, + libtool, + intltool, + gnome-doc-utils, + libxslt, + gnome2, + gtk2, + libxml2, + enchant, + mariadb-connector-c, + pcre, + speech-tools, + speech-toolsDisable ? false, + espeak, + espeakDisable ? false, }: - with lib; + stdenv.mkDerivation rec { + pname = "stardict"; + version = "3.0.6"; -stdenv.mkDerivation rec { - pname = "stardict"; - version = "3.0.6"; - - src = fetchurl { - url = "https://downloads.sourceforge.net/project/stardict-4/${version}/stardict-${version}.tar.bz2"; - sha256 = "1rw2dg1d489gjjx9957j2jdmjlvylv31pnx3142lwq3pi5d6j2ka"; - }; - patches = [ - ./enchant2.patch - ./gcc46.patch - ./gconf.patch - ./glib2.patch - ./makefile.patch - ./mariadb.patch - ]; + src = fetchurl { + url = "https://downloads.sourceforge.net/project/stardict-4/${version}/stardict-${version}.tar.bz2"; + sha256 = "1rw2dg1d489gjjx9957j2jdmjlvylv31pnx3142lwq3pi5d6j2ka"; + }; + patches = [ + ./enchant2.patch + ./gcc46.patch + ./gconf.patch + ./glib2.patch + ./makefile.patch + ./mariadb.patch + ]; - nativeBuildInputs = [ - autoreconfHook wrapGAppsHook - pkg-config intltool gnome-doc-utils libxslt - ]; - buildInputs = [ - gnome2.gnome-common gnome2.GConf - gtk2 libxml2 enchant mariadb-connector-c pcre - ] - ++ optional (!speech-toolsDisable) speech-tools - ++ optional (!espeakDisable) espeak; - configureFlags = [ - "--disable-gnome-support" - "--disable-gucharmap" - "--disable-scrollkeeper" - "--disable-festival" - "--disable-gpe-support" - "--disable-schemas-install" - ] - ++ optional speech-toolsDisable "--disable-speech-tools" - ++ optional espeakDisable "--disable-espeak"; + nativeBuildInputs = [ + autoreconfHook + wrapGAppsHook + pkg-config + intltool + gnome-doc-utils + libxslt + ]; + buildInputs = + [ + gnome2.gnome-common + gnome2.GConf + gtk2 + libxml2 + enchant + mariadb-connector-c + pcre + ] + ++ optional (!speech-toolsDisable) speech-tools + ++ optional (!espeakDisable) espeak; + configureFlags = + [ + "--disable-gnome-support" + "--disable-gucharmap" + "--disable-scrollkeeper" + "--disable-festival" + "--disable-gpe-support" + "--disable-schemas-install" + ] + ++ optional speech-toolsDisable "--disable-speech-tools" + ++ optional espeakDisable "--disable-espeak"; - meta = with lib; { - description = "Cross-platform and international dictionary software"; - homepage = "http://stardict-4.sourceforge.net/"; - platforms = platforms.linux; - license = licenses.gpl3; - }; -} + meta = with lib; { + description = "Cross-platform and international dictionary software"; + homepage = "http://stardict-4.sourceforge.net/"; + platforms = platforms.linux; + license = licenses.gpl3; + }; + } diff --git a/pkgs/stardict/en-cz.nix b/pkgs/stardict/en-cz.nix index 353334c..ead1a31 100644 --- a/pkgs/stardict/en-cz.nix +++ b/pkgs/stardict/en-cz.nix @@ -1,5 +1,8 @@ -{ lib, stdenvNoCC, fetchurl }: - +{ + lib, + stdenvNoCC, + fetchurl, +}: stdenvNoCC.mkDerivation rec { pname = "stardict-en-cz"; version = "20210401"; diff --git a/pkgs/stardict/wrapper.nix b/pkgs/stardict/wrapper.nix index 6547728..e99fa01 100644 --- a/pkgs/stardict/wrapper.nix +++ b/pkgs/stardict/wrapper.nix @@ -1,20 +1,23 @@ -{ lib, stdenv, makeBinaryWrapper -, stardict +{ + lib, + stdenv, + makeBinaryWrapper, + stardict, }: - -with stardict; - -let - - drv = stdenv.mkDerivation rec { +with stardict; let + drv = stdenv.mkDerivation rec { inherit pname; inherit version; inherit meta; - nativeBuildInputs = [ stardict makeBinaryWrapper ]; - dictionaries = [ /* empty and expecting override */ ]; + nativeBuildInputs = [stardict makeBinaryWrapper]; + dictionaries = [ + /* + empty and expecting override + */ + ]; - phases = [ "installPhase" ]; + phases = ["installPhase"]; installPhase = '' mkdir -p $out/bin $out/usr/share/stardict/dic for dic in $dictionaries; do @@ -32,9 +35,10 @@ let done ''; - passthru.withDictionaries = dicts: drv.overrideAttrs (oldAttrs: { - dictionaries = dicts; - }); + passthru.withDictionaries = dicts: + drv.overrideAttrs (oldAttrs: { + dictionaries = dicts; + }); }; - -in drv +in + drv -- cgit v1.2.3