Loading pkgs/development/tools/argc/default.nix→pkgs/by-name/ar/argc/package.nix +66 −0 Original line number Diff line number Diff line { lib , rustPlatform , fetchFromGitHub , installShellFiles { lib, buildPackages, pkgsCross, rustPlatform, stdenv, fetchFromGitHub, installShellFiles, }: let canExecuteHost = stdenv.buildPlatform.canExecute stdenv.hostPlatform; in rustPlatform.buildRustPackage rec { pname = "argc"; version = "1.14.0"; src = fetchFromGitHub { owner = "sigoden"; repo = pname; repo = "argc"; rev = "v${version}"; hash = "sha256-Li/K5/SLG6JuoRJDz2DQoj1Oi9LQgZWHNvtZ1HVbj88="; }; cargoHash = "sha256-D1T9FWTvwKtAYoqFlR2OmLRLGWhPJ9D8J7lq/QKcBoM="; nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!canExecuteHost) buildPackages.argc; postInstall = '' ARGC=${if canExecuteHost then ''''${!outputBin}/bin/argc'' else "argc"} installShellCompletion --cmd argc \ --bash <($out/bin/argc --argc-completions bash) \ --fish <($out/bin/argc --argc-completions fish) \ --zsh <($out/bin/argc --argc-completions zsh) --bash <("$ARGC" --argc-completions bash) \ --fish <("$ARGC" --argc-completions fish) \ --zsh <("$ARGC" --argc-completions zsh) ''; disallowedReferences = lib.optional (!canExecuteHost) buildPackages.argc; passthru = { tests = { cross = ( if stdenv.hostPlatform.isDarwin then if stdenv.hostPlatform.isAarch64 then pkgsCross.x86_64-darwin else pkgsCross.aarch64-darwin else if stdenv.hostPlatform.isAarch64 then pkgsCross.gnu64 else pkgsCross.aarch64-multiplatform ).argc; }; }; meta = with lib; { description = "A command-line options, arguments and sub-commands parser for bash"; description = "Command-line options, arguments and sub-commands parser for bash"; mainProgram = "argc"; homepage = "https://github.com/sigoden/argc"; changelog = "https://github.com/sigoden/argc/releases/tag/v${version}"; license = with licenses; [ mit /* or */ asl20 ]; license = with licenses; [ mit # or asl20 ]; maintainers = with maintainers; [ figsoda ]; }; } pkgs/top-level/all-packages.nix +0 −2 Original line number Diff line number Diff line Loading @@ -4142,8 +4142,6 @@ with pkgs; aptdec = callPackage ../development/libraries/aptdec { }; argc = callPackage ../development/tools/argc { }; aria2 = callPackage ../tools/networking/aria2 { inherit (darwin.apple_sdk.frameworks) Security; }; Loading
pkgs/development/tools/argc/default.nix→pkgs/by-name/ar/argc/package.nix +66 −0 Original line number Diff line number Diff line { lib , rustPlatform , fetchFromGitHub , installShellFiles { lib, buildPackages, pkgsCross, rustPlatform, stdenv, fetchFromGitHub, installShellFiles, }: let canExecuteHost = stdenv.buildPlatform.canExecute stdenv.hostPlatform; in rustPlatform.buildRustPackage rec { pname = "argc"; version = "1.14.0"; src = fetchFromGitHub { owner = "sigoden"; repo = pname; repo = "argc"; rev = "v${version}"; hash = "sha256-Li/K5/SLG6JuoRJDz2DQoj1Oi9LQgZWHNvtZ1HVbj88="; }; cargoHash = "sha256-D1T9FWTvwKtAYoqFlR2OmLRLGWhPJ9D8J7lq/QKcBoM="; nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!canExecuteHost) buildPackages.argc; postInstall = '' ARGC=${if canExecuteHost then ''''${!outputBin}/bin/argc'' else "argc"} installShellCompletion --cmd argc \ --bash <($out/bin/argc --argc-completions bash) \ --fish <($out/bin/argc --argc-completions fish) \ --zsh <($out/bin/argc --argc-completions zsh) --bash <("$ARGC" --argc-completions bash) \ --fish <("$ARGC" --argc-completions fish) \ --zsh <("$ARGC" --argc-completions zsh) ''; disallowedReferences = lib.optional (!canExecuteHost) buildPackages.argc; passthru = { tests = { cross = ( if stdenv.hostPlatform.isDarwin then if stdenv.hostPlatform.isAarch64 then pkgsCross.x86_64-darwin else pkgsCross.aarch64-darwin else if stdenv.hostPlatform.isAarch64 then pkgsCross.gnu64 else pkgsCross.aarch64-multiplatform ).argc; }; }; meta = with lib; { description = "A command-line options, arguments and sub-commands parser for bash"; description = "Command-line options, arguments and sub-commands parser for bash"; mainProgram = "argc"; homepage = "https://github.com/sigoden/argc"; changelog = "https://github.com/sigoden/argc/releases/tag/v${version}"; license = with licenses; [ mit /* or */ asl20 ]; license = with licenses; [ mit # or asl20 ]; maintainers = with maintainers; [ figsoda ]; }; }
pkgs/top-level/all-packages.nix +0 −2 Original line number Diff line number Diff line Loading @@ -4142,8 +4142,6 @@ with pkgs; aptdec = callPackage ../development/libraries/aptdec { }; argc = callPackage ../development/tools/argc { }; aria2 = callPackage ../tools/networking/aria2 { inherit (darwin.apple_sdk.frameworks) Security; };