Merge pull request #144750 from S-NA/updates/nilfs-utils

nilfs-utils: 2.2.7 -> 2.2.8
This commit is contained in:
Michael Raskin 2021-11-13 09:26:17 +00:00 committed by GitHub
commit 8a5990d5ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,46 +1,23 @@
{ lib, stdenv, fetchurl, fetchpatch, libuuid, libselinux }: { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux }:
let
sourceInfo = rec { stdenv.mkDerivation rec {
version = "2.2.7"; pname = "nilfs-utils";
url = "http://nilfs.sourceforge.net/download/nilfs-utils-${version}.tar.bz2"; version = "2.2.8";
sha256 = "01f09bvjk2crx65pxmxiw362wkkl3v2v144dfn3i7bk5gz253xic";
baseName = "nilfs-utils"; src = fetchFromGitHub {
name = "${baseName}-${version}"; owner = "nilfs-dev";
}; repo = pname;
in rev = "v${version}";
stdenv.mkDerivation { sha256 = "094mw7dsyppyiyzfdnf3f5hlkrh4bidk1kvvpn1kcvw5vn2xpfk7";
src = fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.sha256;
}; };
inherit (sourceInfo) name version; nativeBuildInputs = [ autoreconfHook ];
buildInputs = [libuuid libselinux];
preConfigure = '' buildInputs = [ libuuid libselinux ];
sed -e '/sysconfdir=\/etc/d; ' -i configure
sed -e "s@sbindir=/sbin@sbindir=$out/sbin@" -i configure
sed -e 's@/sbin/@'"$out"'/sbin/@' -i ./lib/cleaner*.c
'';
patches = [ installFlags = [
# Fix w/musl "sysconfdir=${placeholder "out"}/etc"
(fetchpatch { "root_sbindir=${placeholder "out"}/sbin"
url = "https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a.patch";
sha256 = "0h89jz9l5d4rqj647ljbnv451l4ncqpsvzj0v70mn5391hfwsjlv";
})
(fetchpatch {
url = "https://github.com/nilfs-dev/nilfs-utils/commit/51b32c614be9e98c32de7f531ee600ca0740946f.patch";
sha256 = "1ycq83c6jjy74aif47v075k5y2szzwhq6mbcrpd1z4b4i1x6yhpn";
})
];
configureFlags = [
"--with-libmount"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# AC_FUNC_MALLOC is broken on cross builds.
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
]; ];
# FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv # FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv
@ -49,7 +26,7 @@ stdenv.mkDerivation {
# To make sure patchelf doesn't mistakenly keep the reference via # To make sure patchelf doesn't mistakenly keep the reference via
# build directory # build directory
postInstall = '' postInstall = ''
find . -name .libs | xargs rm -rf find . -name .libs -exec rm -rf -- {} +
''; '';
meta = with lib; { meta = with lib; {