cracklib: fix build on Darwin
This commit is contained in:
parent
8fb1d43344
commit
eeab6f4355
@ -1,5 +1,5 @@
|
||||
let version = "2.10.0"; in
|
||||
{ stdenv, lib, buildPackages, fetchurl, zlib, gettext
|
||||
{ stdenv, lib, buildPackages, fetchurl, zlib, gettext, fetchpatch2
|
||||
, lists ? [ (fetchurl {
|
||||
url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
|
||||
hash = "sha256-JDLo/bSLIijC2DUl+8Q704i2zgw5cxL6t68wvuivPpY=";
|
||||
@ -15,6 +15,16 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-cAw5YMplCx6vAhfWmskZuBHyB1o4dGd7hMceOG3V51Y=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
# Fixes build failure on Darwin due to missing byte order functions.
|
||||
# https://github.com/cracklib/cracklib/pull/96
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/cracklib/cracklib/commit/dff319e543272c1fb958261cf9ee8bb82960bc40.patch";
|
||||
hash = "sha256-QaWpEVV6l1kl4OIkJAqkXPVThbo040Rv9X2dY/+syqs=";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib;
|
||||
buildInputs = [ zlib gettext ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user