diff options
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/dict/wiktionary/builder.sh | 8 | ||||
-rw-r--r-- | pkgs/servers/dict/wiktionary/default.nix | 20 | ||||
-rw-r--r-- | pkgs/servers/mail/postfix/default.nix | 10 |
3 files changed, 19 insertions, 19 deletions
diff --git a/pkgs/servers/dict/wiktionary/builder.sh b/pkgs/servers/dict/wiktionary/builder.sh deleted file mode 100644 index 65652ad4bdb..00000000000 --- a/pkgs/servers/dict/wiktionary/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/share/dictd/ -cd $out/share/dictd - -python -O "$convert" "$src" -dictzip wiktionary-en.dict -echo en_US.UTF-8 > locale diff --git a/pkgs/servers/dict/wiktionary/default.nix b/pkgs/servers/dict/wiktionary/default.nix index 3a01120f3a6..05df86f3a78 100644 --- a/pkgs/servers/dict/wiktionary/default.nix +++ b/pkgs/servers/dict/wiktionary/default.nix @@ -1,23 +1,33 @@ { lib, stdenv, fetchurl, python2, dict, glibcLocales }: stdenv.mkDerivation rec { - version = "20210201"; pname = "dict-db-wiktionary"; + version = "20210201"; src = fetchurl { url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2"; sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs"; }; - convert = ./wiktionary2dict.py; - buildInputs = [ python2 dict glibcLocales ]; - builder = ./builder.sh; + # script in nixpkgs does not support python2 + nativeBuildInputs = [ python2 dict glibcLocales ]; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/share/dictd/ + cd $out/share/dictd + + ${python2.interpreter} -O ${./wiktionary2dict.py} "${src}" + dictzip wiktionary-en.dict + echo en_US.UTF-8 > locale + ''; passthru.updateScript = ./update.sh; meta = with lib; { description = "DICT version of English Wiktionary"; - homepage = "http://en.wiktionary.org/"; + homepage = "https://en.wiktionary.org/"; maintainers = with maintainers; [ qyliss ]; platforms = platforms.all; license = with licenses; [ cc-by-sa-30 fdl11Plus ]; diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index 2fddaae47b2..16166b73f48 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -23,9 +23,7 @@ let ++ lib.optional withLDAP "-lldap"); in stdenv.mkDerivation rec { - pname = "postfix"; - version = "3.6.1"; src = fetchurl { @@ -35,10 +33,10 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper m4 ]; buildInputs = [ db openssl cyrus_sasl icu libnsl pcre ] - ++ lib.optional withPgSQL postgresql - ++ lib.optional withMySQL libmysqlclient - ++ lib.optional withSQLite sqlite - ++ lib.optional withLDAP openldap; + ++ lib.optional withPgSQL postgresql + ++ lib.optional withMySQL libmysqlclient + ++ lib.optional withSQLite sqlite + ++ lib.optional withLDAP openldap; hardeningDisable = [ "format" ]; hardeningEnable = [ "pie" ]; |