btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / to / toml2nix / package.nix
blobb34f40933b767d8206aed492e2cd6f2499a166f7
1 { lib, rustPlatform, fetchCrate }:
3 rustPlatform.buildRustPackage rec {
4   pname = "toml2nix";
5   version = "0.1.1";
7   src = fetchCrate {
8     inherit pname version;
9     hash = "sha256-YhluLS4tFMibFrDzgIvNtfjM5dAqJQvygeZocKn3+Jg=";
10   };
12   cargoLock.lockFile = ./Cargo.lock;
14   postPatch = ''
15     ln -s ${./Cargo.lock} Cargo.lock
16   '';
18   meta = with lib; {
19     description = "Tool to convert TOML files to Nix expressions";
20     mainProgram = "toml2nix";
21     homepage = "https://crates.io/crates/toml2nix";
22     license = with licenses; [ mit /* or */ asl20 ];
23     maintainers = with maintainers; [ figsoda ];
24   };