nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, stdenv, buildPackages, fetchurl, autoconf, automake, gettext, libtool, pkg-config
2022-03-23 19:42:00 +00:00
, icu, libuuid, readline, inih, liburcu
, nixosTests
2018-11-28 09:44:42 +00:00
}:
2017-07-20 08:54:25 +00:00
stdenv.mkDerivation rec {
pname = "xfsprogs";
version = "6.2.0";
2020-12-25 21:06:59 +00:00
src = fetchurl {
url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
hash = "sha256-1n3LpaKOCQS2CIa25fdSvHycOlxwlhU4VbWtyp24bFE=";
};
2017-07-20 08:54:25 +00:00
outputs = [ "bin" "dev" "out" "doc" ];
2014-09-19 21:18:33 +00:00
2018-11-28 09:44:42 +00:00
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
autoconf automake libtool gettext pkg-config
2018-11-28 09:44:42 +00:00
libuuid # codegen tool uses libuuid
];
2022-03-23 19:42:00 +00:00
buildInputs = [ readline icu inih liburcu ];
2018-11-28 09:44:42 +00:00
propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
2017-07-20 08:54:25 +00:00
enableParallelBuilding = true;
# Install fails as:
# make[1]: *** No rule to make target '\', needed by 'kmem.lo'. Stop.
enableParallelInstalling = false;
2020-12-25 21:06:59 +00:00
# @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
2014-09-19 23:14:50 +00:00
preConfigure = ''
2020-12-25 21:06:59 +00:00
for file in scrub/{xfs_scrub_all.cron.in,xfs_scrub@.service.in,xfs_scrub_all.service.in}; do
substituteInPlace "$file" \
--replace '@sbindir@' '/run/current-system/sw/bin'
done
2017-07-20 08:54:25 +00:00
make configure
2020-12-25 21:06:59 +00:00
patchShebangs ./install-sh
2014-09-19 23:14:50 +00:00
'';
2014-09-19 21:18:33 +00:00
configureFlags = [
"--disable-lib64"
2020-12-25 21:06:59 +00:00
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
2014-09-19 21:18:33 +00:00
];
2014-09-19 21:18:33 +00:00
installFlags = [ "install-dev" ];
2017-07-20 08:54:25 +00:00
# FIXME: forbidden rpath
postInstall = ''
find . -type d -name .libs | xargs rm -rf
'';
2014-09-19 21:18:33 +00:00
passthru.tests = {
inherit (nixosTests.installer) lvm;
};
meta = with lib; {
homepage = "https://xfs.org/";
description = "SGI XFS utilities";
license = with licenses; [ gpl2Only lgpl21 gpl3Plus ]; # see https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/debian/copyright
2014-09-19 21:18:33 +00:00
platforms = platforms.linux;
2020-12-25 21:06:59 +00:00
maintainers = with maintainers; [ dezgeg ajs124 ];
};
}