nixpkgs/pkgs/by-name/ni/nilfs-utils/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

65 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libuuid,
libselinux,
e2fsprogs,
}:
stdenv.mkDerivation rec {
pname = "nilfs-utils";
version = "2.2.11";
src = fetchFromGitHub {
owner = "nilfs-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-qvs0PBkMYzGfIQ/Z2Wz0aHe2Y2Ia6fA4pMSk5Jhejf4=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
libuuid
libselinux
];
postPatch = ''
# Fix up hardcoded paths.
substituteInPlace lib/cleaner_exec.c --replace /sbin/ $out/bin/
substituteInPlace sbin/mkfs/mkfs.c --replace /sbin/ ${lib.getBin e2fsprogs}/bin/
'';
# According to upstream, libmount should be detected automatically but the
# build system fails to do this. This is likely a bug with their build system
# hence it is explicitly enabled here.
configureFlags = [ "--with-libmount" ];
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
"root_sbindir=${placeholder "out"}/sbin"
];
# 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 -exec rm -rf -- {} +
'';
meta = with lib; {
description = "NILFS utilities";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
license = with licenses; [
gpl2Plus
lgpl21
];
downloadPage = "http://nilfs.sourceforge.net/en/download.html";
};
}