
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 b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
nixosTests,
|
|
|
|
# updater
|
|
git,
|
|
coreutils,
|
|
gawk,
|
|
gnused,
|
|
writeScript,
|
|
nix-update,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mailcap";
|
|
version = "2.1.54";
|
|
|
|
src = fetchurl {
|
|
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
|
|
hash = "sha256-mkAyIC/A0rCFj0GxZzianP5SrCTsKC5kebkHZTGd4RM=";
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
substituteInPlace mailcap --replace "/usr/bin/" ""
|
|
sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types
|
|
|
|
install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types
|
|
install -D -m0644 -t $out/etc mailcap mime.types
|
|
install -D -m0644 -t $out/share/man/man5 mailcap.5
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = writeScript "update-mailcap" ''
|
|
export PATH=${
|
|
lib.makeBinPath [
|
|
git
|
|
coreutils
|
|
gawk
|
|
gnused
|
|
nix-update
|
|
]
|
|
}:$PATH
|
|
VERSION="$(git ls-remote --tags --sort="v:refname" https://pagure.io/mailcap.git | \
|
|
awk '{ print $2 }' | \
|
|
grep "refs/tags/r" | \
|
|
sed -E -e "s,refs/tags/r(.*)$,\1," -e "s/-/./g" | \
|
|
sort --version-sort --reverse | \
|
|
head -n1)"
|
|
exec nix-update --version "$VERSION" "$@"
|
|
'';
|
|
|
|
passthru.tests.nginx-mime = nixosTests.nginx-mime;
|
|
|
|
meta = with lib; {
|
|
description = "Helper application and MIME type associations for file types";
|
|
homepage = "https://pagure.io/mailcap";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ c0bw3b ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|