libxcrypt: use tarball src, prune dependencies

This commit is contained in:
Martin Weinelt
2022-07-17 03:01:01 +02:00
parent ff30c899d8
commit 7c29dcb80b
@@ -1,36 +1,25 @@
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, perl, fetchpatch }:
{ lib, stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
pname = "libxcrypt";
version = "4.4.28";
src = fetchFromGitHub {
owner = "besser82";
repo = "libxcrypt";
rev = "v${version}";
sha256 = "sha256-Ohf+RCOXnoCxAFnXXV9e2TCqpfZziQl+FGJTGDSQTF0=";
src = fetchurl {
url = "https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz";
sha256 = "sha256-npNoEfn60R28ozyhm9l8VcUus8oVkB8nreBGzHnmnoc=";
};
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
'';
configureFlags = [
"--disable-werror"
"--enable-hashes=all"
"--enable-obsolete-api=glibc"
"--disable-failure-tokens"
];
nativeBuildInputs = [ autoconf automake libtool pkg-config perl ];
nativeBuildInputs = [
perl
];
enableParallelBuilding = true;
doCheck = true;