toml2nix: switch to rustPlatform.buildRustPackage

figsoda 45f2a5ee 4b7ae82d

+50 -19
+25
pkgs/development/tools/toml2nix/Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 3 4 + 5 + [[package]] 6 + name = "serde" 7 + version = "1.0.145" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" 10 + 11 + [[package]] 12 + name = "toml" 13 + version = "0.4.10" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 16 + dependencies = [ 17 + "serde", 18 + ] 19 + 20 + [[package]] 21 + name = "toml2nix" 22 + version = "0.1.1" 23 + dependencies = [ 24 + "toml", 25 + ]
+24
pkgs/development/tools/toml2nix/default.nix
··· 1 + { lib, rustPlatform, fetchCrate }: 2 + 3 + rustPlatform.buildRustPackage rec { 4 + pname = "toml2nix"; 5 + version = "0.1.1"; 6 + 7 + src = fetchCrate { 8 + inherit pname version; 9 + sha256 = "sha256-YhluLS4tFMibFrDzgIvNtfjM5dAqJQvygeZocKn3+Jg="; 10 + }; 11 + 12 + cargoLock.lockFile = ./Cargo.lock; 13 + 14 + postPatch = '' 15 + ln -s ${./Cargo.lock} Cargo.lock 16 + ''; 17 + 18 + meta = with lib; { 19 + description = "A tool to convert TOML files to Nix expressions"; 20 + homepage = "https://crates.io/crates/toml2nix"; 21 + license = with licenses; [ mit /* or */ asl20 ]; 22 + maintainers = with maintainers; [ figsoda ]; 23 + }; 24 + }
-18
pkgs/tools/toml2nix/default.nix
··· 1 - # Generated by carnix 0.9.7: carnix generate-nix 2 - { lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }: 3 - with buildRustCrateHelpers; 4 - let inherit (lib.lists) fold; 5 - inherit (lib.attrsets) recursiveUpdate; 6 - in 7 - let crates = cratesIO; in 8 - rec { 9 - toml2nix = crates.crates.toml2nix."0.1.1" deps; 10 - __all = [ (toml2nix {}) ]; 11 - deps.serde."1.0.84" = {}; 12 - deps.toml."0.4.10" = { 13 - serde = "1.0.84"; 14 - }; 15 - deps.toml2nix."0.1.1" = { 16 - toml = "0.4.10"; 17 - }; 18 - }
+1 -1
pkgs/top-level/all-packages.nix
··· 11890 11890 11891 11891 toml2json = callPackage ../development/tools/toml2json { }; 11892 11892 11893 - toml2nix = (callPackage ../tools/toml2nix { }).toml2nix { }; 11893 + toml2nix = callPackage ../development/tools/toml2nix { }; 11894 11894 11895 11895 topgrade = callPackage ../tools/misc/topgrade { 11896 11896 inherit (darwin.apple_sdk.frameworks) Cocoa Foundation;