From bcb92f53d59bb9f63fbe537ac17b9780852a339b Mon Sep 17 00:00:00 2001 From: Josh Holland Date: Tue, 28 Jul 2020 12:54:30 +0100 Subject: [PATCH] as-tree: init at 0.12.0 --- pkgs/tools/misc/as-tree/cargo-lock.patch | 13 ++++++++++++ pkgs/tools/misc/as-tree/default.nix | 27 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 pkgs/tools/misc/as-tree/cargo-lock.patch create mode 100644 pkgs/tools/misc/as-tree/default.nix diff --git a/pkgs/tools/misc/as-tree/cargo-lock.patch b/pkgs/tools/misc/as-tree/cargo-lock.patch new file mode 100644 index 000000000000..f7a06c050d2d --- /dev/null +++ b/pkgs/tools/misc/as-tree/cargo-lock.patch @@ -0,0 +1,13 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 991ecd8..9e94574 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -11,7 +11,7 @@ dependencies = [ + + [[package]] + name = "as-tree" +-version = "0.11.1" ++version = "0.12.0" + dependencies = [ + "ansi_term", + "atty", diff --git a/pkgs/tools/misc/as-tree/default.nix b/pkgs/tools/misc/as-tree/default.nix new file mode 100644 index 000000000000..7cc97fd79e46 --- /dev/null +++ b/pkgs/tools/misc/as-tree/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "as-tree"; + version = "0.12.0"; + + src = fetchFromGitHub { + owner = "jez"; + repo = pname; + rev = version; + sha256 = "0c0g32pkyhyvqpgvzlw9244c80npq6s8mxy3may7q4qyd7hi3dz5"; + }; + + cargoSha256 = "0yhd9svdxg7akv61msn7rf3rfblb7kxnyn955dfdwyxbxq48qwpr"; + # the upstream 0.12.0 release didn't update the Cargo.lock file properly + # they have updated their release script, so this patch can be removed + # when the next version is released. + cargoPatches = [ ./cargo-lock.patch ]; + + meta = with lib; { + description = "Print a list of paths as a tree of paths"; + homepage = "https://github.com/jez/as-tree"; + license = with licenses; [ blueOak100 ]; + maintainers = with maintainers; [ jshholland ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 250e25228951..456ecfc3ca0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1338,6 +1338,8 @@ in }; aria = aria2; + as-tree = callPackage ../tools/misc/as-tree { }; + asmfmt = callPackage ../development/tools/asmfmt { }; aspcud = callPackage ../tools/misc/aspcud { };