diff options
| author | Aaron Jheng <wentworth@outlook.com> | 2022-10-07 08:37:37 +0000 |
|---|---|---|
| committer | Aaron Jheng <wentworth@outlook.com> | 2022-10-28 03:40:58 +0000 |
| commit | 5ab95b1b930240f8be50e3652cc1a5778490d1cf (patch) | |
| tree | 751cf5c400ee2cdd80028de87690c729d31dfd8a | |
| parent | Merge pull request #194442 from matthewpi/protoc-gen-validate/0.6.13 (diff) | |
| download | nixpkgs-5ab95b1b930240f8be50e3652cc1a5778490d1cf.tar.gz | |
trunk-io: init at 1.2.2
| -rw-r--r-- | pkgs/development/tools/trunk-io/default.nix | 28 | ||||
| -rwxr-xr-x | pkgs/development/tools/trunk-io/update.sh | 7 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/tools/trunk-io/default.nix b/pkgs/development/tools/trunk-io/default.nix new file mode 100644 index 000000000000..293a73ceff5a --- /dev/null +++ b/pkgs/development/tools/trunk-io/default.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "trunk-io"; + version = "1.2.2"; + + src = fetchurl { + url = "https://trunk.io/releases/launcher/${version}/trunk"; + sha256 = "sha256-+A9FUqcxF/zji2QGD50avYSAib4sq8u6R50YzRailMc="; + }; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + install -D $src $out/bin/trunk + ''; + + passthru.updateScript = ./update.sh; + + meta = with lib; { + homepage = "https://trunk.io/"; + description = "Developer experience toolkit used to check, test, merge, and monitor code"; + license = licenses.unfree; + maintainers = with maintainers; [ aaronjheng ]; + }; +} diff --git a/pkgs/development/tools/trunk-io/update.sh b/pkgs/development/tools/trunk-io/update.sh new file mode 100755 index 000000000000..9110bb633527 --- /dev/null +++ b/pkgs/development/tools/trunk-io/update.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl pcre common-updater-scripts + +set -eu -o pipefail + +version="$(curl -fsSL https://trunk.io/releases/trunk | grep -Fi 'readonly TRUNK_LAUNCHER_VERSION=' | pcregrep -o1 '"(\d+(?:\.\d+)+)"')" +update-source-version trunk-io "$version" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e25d5bbf669..d78388aad498 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12054,6 +12054,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreServices Security; }; + trunk-io = callPackage ../development/tools/trunk-io { }; + tthsum = callPackage ../applications/misc/tthsum { }; ttp = with python3.pkgs; toPythonApplication ttp; |
