nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 nix,
4 nix-update-script,
5 fetchFromGitHub,
6 rustPlatform,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "nps";
11 version = "0.2.12";
12
13 src = fetchFromGitHub {
14 owner = "OleMussmann";
15 repo = "nps";
16 tag = "v${version}";
17 hash = "sha256-kOVpn13lJYeO/99e39c0wbe7qcKHyMj5v4prBtZ3N7s=";
18 };
19
20 cargoHash = "sha256-dJA9fOU06txPAx5kMl7aGoFeKo7UXqB7X+viUfJqG/M=";
21
22 nativeCheckInputs = [ nix ];
23
24 passthru.updateScript = nix-update-script { };
25
26 meta = {
27 description = "Cache the nix package list, query and sort results by relevance";
28 longDescription = ''
29 Find SEARCH_TERM in available nix packages and sort results by relevance.
30
31 List up to three columns, the latter two being optional:
32 PACKAGE_NAME <PACKAGE_VERSION> <PACKAGE_DESCRIPTION>
33
34 Matches are sorted by type. Show 'indirect' matches first, then 'direct' matches, and finally 'exact' matches.
35
36 indirect fooSEARCH_TERMbar (SEARCH_TERM appears in any column)
37 direct SEARCH_TERMbar (PACKAGE_NAME starts with SEARCH_TERM)
38 exact SEARCH_TERM (PACKAGE_NAME is exactly SEARCH_TERM)
39 '';
40 changelog = "https://github.com/OleMussmann/nps/releases/tag/v${version}";
41 homepage = "https://github.com/OleMussmann/nps";
42 license = lib.licenses.mit;
43 mainProgram = "nps";
44 maintainers = with lib.maintainers; [
45 mdaniels5757
46 olemussmann
47 ];
48 platforms = lib.platforms.all;
49 };
50}