From 4abc60314f26cd1d381ace5b5a9d4d36ba728d13 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 20 May 2023 22:43:00 -0400 Subject: [PATCH] argc: 1.0.0 -> 1.1.0 Diff: https://github.com/sigoden/argc/compare/v1.0.0...v1.1.0 Changelog: https://github.com/sigoden/argc/releases/tag/v1.1.0 --- pkgs/development/tools/argc/default.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/argc/default.nix b/pkgs/development/tools/argc/default.nix index d8e7c0ffb748..d87863a79b9c 100644 --- a/pkgs/development/tools/argc/default.nix +++ b/pkgs/development/tools/argc/default.nix @@ -1,20 +1,30 @@ -{ lib, rustPlatform, fetchFromGitHub, installShellFiles }: +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, rust +, stdenv +}: rustPlatform.buildRustPackage rec { pname = "argc"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "sigoden"; repo = pname; rev = "v${version}"; - hash = "sha256-lZtAhsEfMzj8Irl7LQPzjBNiKKy8091p2XoB5wSPhKM="; + hash = "sha256-db75OoFmsR03lK99vGg8+fHJENOyoDFo+uqQJNYmI9M="; }; - cargoHash = "sha256-L0FX4RuJ5n76CCWVpGQryX7usXGBN55W9+y83s9JJug="; + cargoHash = "sha256-6TC4RWDcg4el+jkq8Jal0k+2sdNsjMkMYqP/b9wP5mU="; nativeBuildInputs = [ installShellFiles ]; + preCheck = '' + export PATH=target/${rust.toRustTarget stdenv.hostPlatform}/release:$PATH + ''; + postInstall = '' installShellCompletion --cmd argc \ --bash <($out/bin/argc --argc-completions bash) \ @@ -23,7 +33,7 @@ rustPlatform.buildRustPackage rec { ''; meta = with lib; { - description = "A tool to handle sh/bash cli parameters"; + description = "A command-line options, arguments and sub-commands parser for bash"; homepage = "https://github.com/sigoden/argc"; changelog = "https://github.com/sigoden/argc/releases/tag/v${version}"; license = with licenses; [ mit /* or */ asl20 ];