nixpkgs/pkgs/by-name/ma/man-pages/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

38 lines
997 B
Nix

{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "man-pages";
version = "6.9.1";
src = fetchurl {
url = "mirror://kernel/linux/docs/man-pages/${pname}-${version}.tar.xz";
hash = "sha256-4jy6wp8RC6Vx8NqFI+edNzaRRm7X8qMTAXIYF9NFML0=";
};
makeFlags = [
"prefix=${placeholder "out"}"
];
dontBuild = true;
outputDocdev = "out";
enableParallelInstalling = true;
postInstall = ''
# The manpath executable looks up manpages from PATH. And this package won't
# appear in PATH unless it has a /bin folder. Without the change
# 'nix-shell -p man-pages' does not pull in the search paths.
# See 'man 5 manpath' for the lookup order.
mkdir -p $out/bin
'';
meta = with lib; {
description = "Linux development manual pages";
homepage = "https://www.kernel.org/doc/man-pages/";
license = licenses.gpl2Plus;
platforms = with platforms; unix;
priority = 30; # if a package comes with its own man page, prefer it
};
}