nixpkgs/pkgs/by-name/rf/rfc/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

50 lines
1.1 KiB
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, curl
, installShellFiles
, makeWrapper
}:
stdenvNoCC.mkDerivation rec {
pname = "rfc";
version = "1.0.0";
src = fetchFromGitHub {
owner = "bfontaine";
repo = "rfc";
rev = "v${version}";
hash = "sha256-zN+MQtHh69PkzbrfceHFpBYCPmTg9qrOf/ML2efq6Xk=";
};
nativeBuildInputs = [ installShellFiles makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin rfc
wrapProgram $out/bin/rfc \
--prefix PATH : ${lib.makeBinPath [ curl ]}
installManPage man/rfc.1
runHook postInstall
'';
meta = with lib; {
description = "Tool to read RFCs from the command line";
longDescription = ''
rfc is a little tool written in Bash to read RFCs from the command-line.
It fetches RFCs and drafts from the Web and caches them locally.
'';
homepage = "https://github.com/bfontaine/rfc";
changelog = "https://github.com/bfontaine/rfc/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
platforms = platforms.all;
mainProgram = "rfc";
};
}