Merge pull request #194895 from aaronjheng/trunk-io

This commit is contained in:
Sandro 2022-10-28 13:43:53 +02:00 committed by GitHub
commit 759181d23f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 0 deletions

View File

@ -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 ];
};
}

View File

@ -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"

View File

@ -12069,6 +12069,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;