From aa2468f4a112039647a96fa5232710d1d2f6e8b4 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Wed, 17 Apr 2019 20:25:40 -0400 Subject: cracklib: fix cross build --- pkgs/development/libraries/cracklib/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/cracklib/default.nix b/pkgs/development/libraries/cracklib/default.nix index d335a286c87..ea3f5e6476b 100644 --- a/pkgs/development/libraries/cracklib/default.nix +++ b/pkgs/development/libraries/cracklib/default.nix @@ -1,5 +1,5 @@ let version = "2.9.7"; in -{ stdenv, fetchurl, zlib, gettext +{ stdenv, lib, buildPackages, fetchurl, zlib, gettext , wordlists ? [ (fetchurl { url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz"; sha256 = "12fk8w06q628v754l357cf8kfjna98wj09qybpqr892az3x4a33z"; @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { sha256 = "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"; }; + nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib; buildInputs = [ zlib gettext ]; postPatch = '' @@ -25,12 +26,12 @@ stdenv.mkDerivation rec { ''; postInstall = '' - make dict + make dict-local ''; doInstallCheck = true; installCheckTarget = "test"; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/cracklib/cracklib; description = "A library for checking the strength of passwords"; license = licenses.lgpl21; # Different license for the wordlist: http://www.openwall.com/wordlists -- cgit 1.4.1