summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/to/toml-cli/package.nix
blob: b51bf83cb5bae726e5dae86c1345705159600f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  lib,
  fetchCrate,
  rustPlatform,
  testers,
  toml-cli,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "toml-cli";
  version = "0.2.3";

  src = fetchCrate {
    inherit (finalAttrs) version;
    pname = "toml-cli";
    hash = "sha256-V/yMk/Zt3yvEx10nzRhY/7GYnQninGg9h63NSaQChSA=";
  };

  cargoHash = "sha256-PoqVMTCRmSTt7UhCpMF3ixmAfVtpkaOfaTTmDNhrpLA=";

  cargoTestFlags = [
    "--bin=toml"
    # # The `CARGO_BIN_EXE_toml` build-time env doesn't appear to be resolving
    # # correctly with buildRustPackage. Only run the unittests instead.
    # "--test=integration"
  ];

  passthru.tests = {
    version = testers.testVersion { package = toml-cli; };
  };

  meta = {
    description = "Simple CLI for editing and querying TOML files";
    homepage = "https://github.com/gnprice/toml-cli";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ phlip9 ];
    mainProgram = "toml";
  };
})