From ff8794f1b56cc756ecd17787bebc4ba2bf03a168 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sat, 1 Oct 2022 16:24:38 +0200 Subject: [PATCH] pkgsMusl.libxcrypt: fix build --- pkgs/development/libraries/libxcrypt/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index 782655ef5ee0..eadf6f91e1e0 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, perl }: +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, perl, fetchpatch }: stdenv.mkDerivation rec { pname = "libxcrypt"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-Ohf+RCOXnoCxAFnXXV9e2TCqpfZziQl+FGJTGDSQTF0="; }; + patches = [ + # Fix for tests on musl is being upstreamed: + # https://github.com/besser82/libxcrypt/pull/157 + # Applied in all environments to prevent patchrot + (fetchpatch { + url = "https://github.com/besser82/libxcrypt/commit/a4228faa0b96986abc076125cf97d352a063d92f.patch"; + sha256 = "sha256-iGNz8eer6OkA0yR74WisE6GbFTYyXKw7koXl/R7DhVE="; + }) + ]; + preConfigure = '' patchShebangs autogen.sh ./autogen.sh