add t3 code pkg
This commit is contained in:
@@ -0,0 +1,70 @@
|
|||||||
|
name: t3code update
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "50 6 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-t3code:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: install nix
|
||||||
|
uses: cachix/install-nix-action@v27
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
|
||||||
|
- name: check latest t3code release and update file
|
||||||
|
id: update
|
||||||
|
env:
|
||||||
|
FILE: modules/pkgs/t3code.nix
|
||||||
|
LATEST_RELEASE_URL: https://github.com/pingdotgg/t3code/releases/latest
|
||||||
|
DOWNLOAD_URL_TEMPLATE: https://github.com/pingdotgg/t3code/releases/download/v{version}/T3-Code-{version}-x86_64.AppImage
|
||||||
|
RELEASE_TAG_TEMPLATE: v{version}
|
||||||
|
shell: bash
|
||||||
|
run: bash .gitea/scripts/update-appimage-nix.sh
|
||||||
|
|
||||||
|
- name: create branch and commit
|
||||||
|
if: steps.update.outputs.updated == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
version="${{ steps.update.outputs.version }}"
|
||||||
|
|
||||||
|
BRANCH="bot/t3code-${version}" \
|
||||||
|
FILE="modules/pkgs/t3code.nix" \
|
||||||
|
COMMIT_MESSAGE="update t3code to ${version}" \
|
||||||
|
bash .gitea/scripts/commit-update.sh
|
||||||
|
|
||||||
|
- name: open pull request
|
||||||
|
if: steps.update.outputs.updated == 'true'
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
version="${{ steps.update.outputs.version }}"
|
||||||
|
previous_version="${{ steps.update.outputs.previous_version }}"
|
||||||
|
release_url="${{ steps.update.outputs.release_url }}"
|
||||||
|
|
||||||
|
pr_body=$(cat <<EOF
|
||||||
|
automated update of t3code appimage version and hash
|
||||||
|
|
||||||
|
## changelog
|
||||||
|
from \`${previous_version}\` to \`${version}\`
|
||||||
|
|
||||||
|
upstream release: ${release_url}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
GITEA_API="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config" \
|
||||||
|
BRANCH="bot/t3code-${version}" \
|
||||||
|
TITLE="update t3code to ${version}" \
|
||||||
|
BODY="$pr_body" \
|
||||||
|
bash .gitea/scripts/create-gitea-pr.sh
|
||||||
Generated
+6
-6
@@ -86,11 +86,11 @@
|
|||||||
},
|
},
|
||||||
"import-tree": {
|
"import-tree": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772999353,
|
"lastModified": 1773693634,
|
||||||
"narHash": "sha256-dPb0WxUhFaz6wuR3B6ysqFJpsu8txKDPZvS47AT2XLI=",
|
"narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
|
||||||
"owner": "vic",
|
"owner": "vic",
|
||||||
"repo": "import-tree",
|
"repo": "import-tree",
|
||||||
"rev": "545a4df146fce44d155573e47f5a777985acf912",
|
"rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -117,11 +117,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772773019,
|
"lastModified": 1773821835,
|
||||||
"narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=",
|
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "aca4d95fce4914b3892661bcb80b8087293536c6",
|
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
pnpm
|
pnpm
|
||||||
ni
|
ni
|
||||||
code-cursor-fhs
|
code-cursor-fhs
|
||||||
|
codex
|
||||||
|
|
||||||
# LSPs and formatters (previously via Mason)
|
# LSPs and formatters (previously via Mason)
|
||||||
stylua
|
stylua
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
feishin
|
feishin
|
||||||
obsidian
|
obsidian
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.handy
|
self.packages.${pkgs.stdenv.hostPlatform.system}.handy
|
||||||
|
self.packages.${pkgs.stdenv.hostPlatform.system}.t3code
|
||||||
mpv
|
mpv
|
||||||
ffmpeg
|
ffmpeg
|
||||||
tmux
|
tmux
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
perSystem = {pkgs, ...}: {
|
||||||
|
packages.t3code = pkgs.appimageTools.wrapType2 rec {
|
||||||
|
pname = "t3code";
|
||||||
|
version = "0.0.13";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/pingdotgg/t3code/releases/download/v${version}/T3-Code-${version}-x86_64.AppImage";
|
||||||
|
hash = "sha256-oHKIh+aHsbGVHEoLLjItl6AbVRwvWVlZaIWyHKiekVc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraInstallCommands = let
|
||||||
|
contents = pkgs.appimageTools.extract {inherit pname version src;};
|
||||||
|
in ''
|
||||||
|
desktop_file=$(find ${contents} -name "*.desktop" | head -n1)
|
||||||
|
if [ -n "$desktop_file" ]; then
|
||||||
|
install -m 444 -D "$desktop_file" "$out/share/applications/${pname}.desktop"
|
||||||
|
substituteInPlace "$out/share/applications/${pname}.desktop" \
|
||||||
|
--replace 'Exec=AppRun' 'Exec=${pname}' \
|
||||||
|
--replace 'Exec=T3-Code' 'Exec=${pname}' \
|
||||||
|
--replace 'Exec=t3-code' 'Exec=${pname}' || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ${contents}/usr/share/icons ]; then
|
||||||
|
cp -r ${contents}/usr/share/icons $out/share
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "T3 Chat Desktop";
|
||||||
|
homepage = "https://t3.codes";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
platforms = ["x86_64-linux"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user