nixpkgs/pkgs/tools/package-management/nix-doc/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

30 lines
855 B
Nix

{ lib, stdenv, rustPlatform, fetchFromGitHub, boost, nix, pkg-config }:
rustPlatform.buildRustPackage rec {
pname = "nix-doc";
version = "0.3.3";
src = fetchFromGitHub {
rev = "v${version}";
owner = "lf-";
repo = "nix-doc";
sha256 = "0vd7159y5w8jjgaw51kfr3z3r50299gvw7vjchpqx3nwmdink8bh";
};
doCheck = true;
buildInputs = [ boost nix ];
nativeBuildInputs = [ pkg-config ];
cargoSha256 = "1xz3qngs8p0s62dq4d46c01z3k1vvgg856767g56b13c38pzfh28";
meta = with lib; {
description = "An interactive Nix documentation tool";
longDescription = "An interactive Nix documentation tool providing a CLI for function search and a Nix plugin for docs in the REPL";
homepage = "https://github.com/lf-/nix-doc";
license = licenses.lgpl3;
maintainers = [ maintainers.lf- ];
platforms = platforms.unix;
};
}