toml2nix: switch to rustPlatform.buildRustPackage
This commit is contained in:
parent
4b7ae82d24
commit
45f2a5eea0
4 changed files with 50 additions and 19 deletions
25
pkgs/development/tools/toml2nix/Cargo.lock
generated
Normal file
25
pkgs/development/tools/toml2nix/Cargo.lock
generated
Normal file
|
@ -0,0 +1,25 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml2nix"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"toml",
|
||||
]
|
24
pkgs/development/tools/toml2nix/default.nix
Normal file
24
pkgs/development/tools/toml2nix/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, rustPlatform, fetchCrate }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "toml2nix";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-YhluLS4tFMibFrDzgIvNtfjM5dAqJQvygeZocKn3+Jg=";
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to convert TOML files to Nix expressions";
|
||||
homepage = "https://crates.io/crates/toml2nix";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
# Generated by carnix 0.9.7: carnix generate-nix
|
||||
{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
|
||||
with buildRustCrateHelpers;
|
||||
let inherit (lib.lists) fold;
|
||||
inherit (lib.attrsets) recursiveUpdate;
|
||||
in
|
||||
let crates = cratesIO; in
|
||||
rec {
|
||||
toml2nix = crates.crates.toml2nix."0.1.1" deps;
|
||||
__all = [ (toml2nix {}) ];
|
||||
deps.serde."1.0.84" = {};
|
||||
deps.toml."0.4.10" = {
|
||||
serde = "1.0.84";
|
||||
};
|
||||
deps.toml2nix."0.1.1" = {
|
||||
toml = "0.4.10";
|
||||
};
|
||||
}
|
|
@ -11890,7 +11890,7 @@ with pkgs;
|
|||
|
||||
toml2json = callPackage ../development/tools/toml2json { };
|
||||
|
||||
toml2nix = (callPackage ../tools/toml2nix { }).toml2nix { };
|
||||
toml2nix = callPackage ../development/tools/toml2nix { };
|
||||
|
||||
topgrade = callPackage ../tools/misc/topgrade {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa Foundation;
|
||||
|
|
Loading…
Reference in a new issue