nixpkgs/pkgs/tools/filesystems/nilfs-utils/default.nix
Michael Raskin 4ef4a17f77 nilfs-utils: fix build
Just kill .libs to make sure patchelf does shrink-rpath correctly

Complain in comments that patchelf/#98 is still not used by stdenv
2017-08-30 17:54:04 +02:00

47 lines
1.2 KiB
Nix

{ stdenv, fetchurl, libuuid, libselinux }:
let
sourceInfo = rec {
version = "2.2.6";
url = "http://nilfs.sourceforge.net/download/nilfs-utils-${version}.tar.bz2";
sha256 = "1rjj6pv7yx5wm7b3w6hv88v6r53jqaam5nrnkw2and4ifhsprf3y";
baseName = "nilfs-utils";
name = "${baseName}-${version}";
};
in
stdenv.mkDerivation rec {
src = fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.sha256;
};
inherit (sourceInfo) name version;
buildInputs = [libuuid libselinux];
preConfigure = ''
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
'';
# FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv
# still doesn't use it
#
# To make sure patchelf doesn't mistakenly keep the reference via
# build directory
postInstall = ''
find . -name .libs | xargs rm -rf
'';
meta = {
description = "NILFS utilities";
maintainers = with stdenv.lib.maintainers;
[
raskin
];
platforms = with stdenv.lib.platforms;
linux;
downloadPage = "http://nilfs.sourceforge.net/en/download.html";
updateWalker = true;
};
}