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