wow
All checks were successful
CI / list-packages (push) Successful in 5s
CI / build (helium) (push) Successful in 29s
CI / build (pjsk-cursor) (push) Successful in 12s
CI / build (waterfox-bin) (push) Successful in 5s
CI / build (xcursor-mizuki) (push) Successful in 3s

This commit is contained in:
암냥 2026-04-26 02:11:42 +09:00
commit eceaac0513
No known key found for this signature in database
4 changed files with 155 additions and 4 deletions

View file

@ -0,0 +1,94 @@
name: Update Helium
on:
schedule:
- cron: '0 0 * * *' # 매일 UTC 00:00
workflow_dispatch:
jobs:
update:
runs-on: x86_64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for new helium release
id: check
run: |
source /etc/bashrc
CURRENT_VERSION=$(grep 'version = ' pkgs/helium/default.nix | head -1 | grep -oP '"[^"]+"' | tr -d '"')
echo "Current version: $CURRENT_VERSION"
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/imputnet/helium-linux/releases/latest | nix run nixpkgs#jq -- -r '.tag_name')
echo "Latest version: $LATEST_VERSION"
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "Already up to date."
echo "updated=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "New version found: $LATEST_VERSION"
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
echo "updated=true" >> $GITHUB_OUTPUT
- name: Update version and sha256
if: steps.check.outputs.updated == 'true'
id: update
run: |
source /etc/bashrc
LATEST="${{ steps.check.outputs.latest_version }}"
PNAME="helium"
URL="https://github.com/imputnet/helium-linux/releases/download/${LATEST}/${PNAME}-${LATEST}-x86_64.AppImage"
echo "Fetching new sha256 for $URL"
NEW_SHA256=$(nix-prefetch-url --type sha256 "$URL" 2>/dev/null | tail -1)
NEW_SHA256_SRI=$(nix hash convert --hash-algo sha256 --to sri "$NEW_SHA256")
echo "New sha256 (SRI): $NEW_SHA256_SRI"
sed -i "s|version = \".*\";|version = \"${LATEST}\";|" pkgs/helium/default.nix
sed -i "s|sha256 = \"sha256-.*\";|sha256 = \"${NEW_SHA256_SRI}\";|" pkgs/helium/default.nix
echo "new_sha256=$NEW_SHA256_SRI" >> $GITHUB_OUTPUT
- name: Verify build
if: steps.check.outputs.updated == 'true'
run: |
source /etc/bashrc
nix build .#helium
- name: Create Pull Request
if: steps.check.outputs.updated == 'true'
env:
API_FORGEJO_TOKEN: ${{ secrets.API_FORGEJO_TOKEN }}
run: |
source /etc/bashrc
LATEST="${{ steps.check.outputs.latest_version }}"
BRANCH="update/helium-${LATEST}"
git config user.name "mizuki"
git config user.email "akiyama@mizuki.guru"
git checkout -b "$BRANCH"
git add pkgs/helium/default.nix
git commit -m "pkgs/helium: update to ${LATEST}"
REPO_URL=$(git remote get-url origin | sed 's|https://||')
git push "https://oauth2:${API_FORGEJO_TOKEN}@${REPO_URL}" "$BRANCH"
# Forgejo API로 PR 생성
FORGEJO_HOST=$(echo "$REPO_URL" | cut -d'/' -f1)
REPO_PATH=$(echo "$REPO_URL" | cut -d'/' -f2-)
curl -fsSL -X POST \
-H "Authorization: token ${API_FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
"https://${FORGEJO_HOST}/api/v1/repos/${REPO_PATH}/pulls" \
-d "{
\"title\": \"pkgs/helium: update to ${LATEST}\",
\"head\": \"${BRANCH}\",
\"base\": \"main\",
\"body\": \"Automated update of helium to version \`${LATEST}\`.\n\nNew sha256: \`${{ steps.update.outputs.new_sha256 }}\`\"
}"

6
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1773734432,
"narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=",
"lastModified": 1776877367,
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cda48547b432e8d3b18b4180ba07473762ec8558",
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
"type": "github"
},
"original": {

View file

@ -14,13 +14,14 @@
waterfox-bin = final.callPackage ./pkgs/waterfox-bin/default.nix { };
xcursor-mizuki = final.callPackage ./pkgs/xcursor-mizuki/default.nix { stdenv = final.stdenv; };
pjsk-cursor = final.callPackage ./pkgs/pjsk-cursor/default.nix { stdenv = final.stdenv; };
helium = final.callPackage ./pkgs/helium/default.nix { };
};
pkgs = nixpkgs.legacyPackages.${system}.extend overlay;
in {
overlays.default = overlay;
packages.${system} = {
inherit (pkgs) waterfox-bin xcursor-mizuki pjsk-cursor;
inherit (pkgs) waterfox-bin xcursor-mizuki pjsk-cursor helium;
# default = pkgs.waterfox-bin;
};
};

56
pkgs/helium/default.nix Normal file
View file

@ -0,0 +1,56 @@
{
pkgs,
commandLineArgs ? [ ],
enableFeatures ? [ ],
libvaSupport ? pkgs.stdenv.hostPlatform.isLinux,
widevineSupport ? false,
}:
pkgs.appimageTools.wrapType2 rec {
pname = "helium";
version = "0.11.4.1";
src = pkgs.fetchurl {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage";
sha256 = "sha256-EavHZuleVkgD4J+gcUQ2ZgGHjvWXzdamUh7r42bUkas=";
};
_enableFeatures =
enableFeatures
++ pkgs.lib.optionals libvaSupport [
"VaapiVideoDecoder"
];
extraPkgs = pkgs: pkgs.lib.optionals libvaSupport [ pkgs.libva ];
extraBwrapArgs = [
"--ro-bind-try /etc/chromium /etc/chromium"
];
nativeBuildInputs = [ pkgs.makeWrapper ];
extraInstallCommands =
let
contents = pkgs.appimageTools.extract { inherit pname version src; };
in
''
wrapProgram $out/bin/${pname} \
${
pkgs.lib.optionalString (
_enableFeatures != [ ]
) "--add-flags \"--enable-features=${pkgs.lib.strings.concatStringsSep "," _enableFeatures}\""
} \
${pkgs.lib.optionalString (
commandLineArgs != [ ]
) "--add-flags \"${pkgs.lib.strings.concatStringsSep " " commandLineArgs}\""} \
${pkgs.lib.optionalString widevineSupport ''
--run "mkdir -p ~/.config/net.imput.helium/WidevineCdm" \
--run "echo '{\"Path\":\"${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm\"}' > ~/.config/net.imput.helium/WidevineCdm/latest-component-updated-widevine-cdm"
''}
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share
'';
}