From e6f7872d977adc93225fc02e2fff6b3679c63b61 Mon Sep 17 00:00:00 2001 From: mizuki Date: Mon, 1 Jun 2026 13:01:03 +0900 Subject: [PATCH 1/4] flake.lock: update 2026-06-01 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index f6a9c89..f52cab9 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1779508470, - "narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=", + "lastModified": 1779560665, + "narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "29916453413845e54a65b8a1cf996842300cd299", + "rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786", "type": "github" }, "original": { From 7289f30692ff7bc9cb9ae848ff8968ce7c7d71d8 Mon Sep 17 00:00:00 2001 From: imnyang Date: Wed, 26 Aug 2026 10:56:44 +0900 Subject: [PATCH 2/4] Remove vscode-insiders package --- .forgejo/workflows/update-vscode-insiders.yml | 162 ------------------ README.md | 1 - flake.nix | 6 +- pkgs/vscode-insiders/default.nix | 100 ----------- 4 files changed, 2 insertions(+), 267 deletions(-) delete mode 100644 .forgejo/workflows/update-vscode-insiders.yml delete mode 100644 pkgs/vscode-insiders/default.nix diff --git a/.forgejo/workflows/update-vscode-insiders.yml b/.forgejo/workflows/update-vscode-insiders.yml deleted file mode 100644 index 4c0ec9c..0000000 --- a/.forgejo/workflows/update-vscode-insiders.yml +++ /dev/null @@ -1,162 +0,0 @@ -name: Update VSCode Insiders - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - -jobs: - update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Check for new vscode-insiders release - id: check - shell: bash - run: | - source /etc/bashrc || true - - CURRENT_VERSION=$(grep 'version = ' pkgs/vscode-insiders/default.nix | head -1 | grep -oP '"[^"]+"' | tr -d '"') - echo "Current version: $CURRENT_VERSION" - - LATEST_VERSION=$(curl -fsSL https://update.code.visualstudio.com/api/releases/insider | nix run nixpkgs#jq -- -r '.[0]') - 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 - shell: bash - run: | - source /etc/bashrc || true - - LATEST="${{ steps.check.outputs.latest_version }}" - - fetch_sri() { - local url="$1" - - HASH=$(nix-prefetch-url --type sha256 "$url" 2>/dev/null | tail -1) - nix hash convert --hash-algo sha256 --to sri "$HASH" - } - - echo "Fetching hashes..." - - LINUX_SHA=$(fetch_sri "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64") - DARWIN_ARM_SHA=$(fetch_sri "https://code.visualstudio.com/sha/download?build=insider&os=darwin-arm64") - DARWIN_X64_SHA=$(fetch_sri "https://code.visualstudio.com/sha/download?build=insider&os=darwin") - - echo "Linux SHA: $LINUX_SHA" - echo "Darwin ARM SHA: $DARWIN_ARM_SHA" - echo "Darwin x64 SHA: $DARWIN_X64_SHA" - - export LATEST - export LINUX_SHA - export DARWIN_ARM_SHA - export DARWIN_X64_SHA - - python <<'PY' - import os - import re - from pathlib import Path - - path = Path("pkgs/vscode-insiders/default.nix") - text = path.read_text() - - text = re.sub( - r'version = ".*?";', - f'version = "{os.environ["LATEST"]}";', - text, - count=1 - ) - - text = re.sub( - r'(os=darwin-arm64";\s+sha256 = ").*?(";\s+)', - rf'\g<1>{os.environ["DARWIN_ARM_SHA"]}\2', - text, - count=1, - flags=re.S - ) - - text = re.sub( - r'(os=darwin";\s+sha256 = ").*?(";\s+)', - rf'\g<1>{os.environ["DARWIN_X64_SHA"]}\2', - text, - count=1, - flags=re.S - ) - - text = re.sub( - r'(os=linux-x64";\s+sha256 = ").*?(";\s+)', - rf'\g<1>{os.environ["LINUX_SHA"]}\2', - text, - count=1, - flags=re.S - ) - - path.write_text(text) - PY - - echo "linux_sha=$LINUX_SHA" >> "$GITHUB_OUTPUT" - echo "darwin_arm_sha=$DARWIN_ARM_SHA" >> "$GITHUB_OUTPUT" - echo "darwin_x64_sha=$DARWIN_X64_SHA" >> "$GITHUB_OUTPUT" - - - name: Verify build - if: steps.check.outputs.updated == 'true' - shell: bash - run: | - source /etc/bashrc || true - - export NIXPKGS_ALLOW_UNFREE=1 - - nix build .#vscode-insiders - - - name: Create Pull Request - if: steps.check.outputs.updated == 'true' - env: - API_FORGEJO_TOKEN: ${{ secrets.API_FORGEJO_TOKEN }} - shell: bash - run: | - source /etc/bashrc || true - - LATEST="${{ steps.check.outputs.latest_version }}" - BRANCH="update/vscode-insiders-${LATEST}" - - git config user.name "mizuki" - git config user.email "akiyama@mizuki.guru" - - git checkout -b "$BRANCH" - - git add pkgs/vscode-insiders/default.nix - - git commit -m "pkgs/vscode-insiders: update to ${LATEST}" - - REPO_URL=$(git remote get-url origin | sed 's|https://||') - - git push "https://oauth2:${API_FORGEJO_TOKEN}@${REPO_URL}" "$BRANCH" - - 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/vscode-insiders: update to ${LATEST}\", - \"head\": \"${BRANCH}\", - \"base\": \"main\", - \"body\": \"Automated update of VSCode Insiders to version \`${LATEST}\`.\n\nLinux SHA:\n\`${{ steps.update.outputs.linux_sha }}\`\n\nDarwin ARM SHA:\n\`${{ steps.update.outputs.darwin_arm_sha }}\`\n\nDarwin x64 SHA:\n\`${{ steps.update.outputs.darwin_x64_sha }}\`\"}" \ No newline at end of file diff --git a/README.md b/README.md index cac98f4..2855a49 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ imnyang's custom nixpkgs overlay. ## Included Packages - `helium`: Helium AppImage wrapper - `helium-sync`: Helium Sync utility -- `vscode-insiders`: VSCode Insiders - `waterfox-bin`: Waterfox Browser - `xcursor-mizuki`: Custom cursor - `pjsk-cursor`: Custom cursor diff --git a/flake.nix b/flake.nix index 2b22aa9..e3665bf 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,6 @@ xcursor-mizuki = final.callPackage ./pkgs/xcursor-mizuki/default.nix { }; pjsk-cursor = final.callPackage ./pkgs/pjsk-cursor/default.nix { }; helium = final.callPackage ./pkgs/helium/default.nix { }; - vscode-insiders = final.callPackage ./pkgs/vscode-insiders/default.nix { }; }; forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f ( @@ -38,8 +37,7 @@ waterfox-bin xcursor-mizuki pjsk-cursor - helium - vscode-insiders; + helium; }; in nixpkgs.lib.filterAttrs (name: pkg: @@ -56,4 +54,4 @@ ]; }; }; -} \ No newline at end of file +} diff --git a/pkgs/vscode-insiders/default.nix b/pkgs/vscode-insiders/default.nix deleted file mode 100644 index 3dd4d81..0000000 --- a/pkgs/vscode-insiders/default.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ pkgs, lib, fetchurl }: - -let - inherit (pkgs) stdenv; - - sysAttrs = - if stdenv.hostPlatform.isDarwin then - if stdenv.hostPlatform.isAarch64 then { - url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-arm64-dmg"; - sha256 = "sha256-K+U6JtVNz1PRzL/0SIEK7RXwQu6LL3p+248Ywbn+mDc="; - name = "vscode-insiders-darwin-arm64.dmg"; - } else { - url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-x64-dmg"; - sha256 = "sha256-ex0ESS9APZxgc7b96Q7EQbckUXE51LmTqDfsnN07W3I="; - name = "vscode-insiders-darwin-x64.dmg"; - } - else { - url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64"; - sha256 = "sha256-kE99FyilwwFv3zTCkufGwD3s1WwoJ2krg10l3Xy5PRE="; - name = "vscode-insiders-linux-x64.tar.gz"; - }; - - src = fetchurl { - inherit (sysAttrs) url sha256 name; - }; - -in - -(pkgs.vscode.override { - isInsiders = true; -}).overrideAttrs (oldAttrs: { - pname = "vscode-insiders"; - version = "1.122.0-insider"; - - inherit src; - - sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin "."; - - postUnpack = lib.optionalString stdenv.hostPlatform.isDarwin '' - export sourceRoot="$(ls -d *.app)" - chmod -R +w "$sourceRoot" - ''; - - nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) - ++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.undmg pkgs.darwin.xattr ]; - - buildInputs = - (oldAttrs.buildInputs or []) - ++ lib.optionals stdenv.hostPlatform.isLinux [ - pkgs.krb5 - pkgs.libsoup_3 - pkgs.webkitgtk_4_1 - ]; - - prePatch = if stdenv.hostPlatform.isDarwin then '' - ${oldAttrs.prePatch or ""} - - mkdir -p Contents/Resources/app/node_modules/@vscode/ripgrep/bin - touch Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg - '' else if stdenv.hostPlatform.isLinux then '' - ${oldAttrs.prePatch or ""} - - mkdir -p resources/app/node_modules/@vscode/ripgrep/bin - touch resources/app/node_modules/@vscode/ripgrep/bin/rg - '' else ""; - - installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' - mkdir -p $out/Applications - cp -r . $out/Applications/Visual\ Studio\ Code\ -\ Insiders.app - - # Create a wrapper script in bin/ to launch the app - mkdir -p $out/bin - cat > $out/bin/code-insiders << 'EOF' - #!/bin/sh - exec "$out/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron" "$@" - EOF - chmod +x $out/bin/code-insiders - ''; - - preFixup = - if stdenv.hostPlatform.isDarwin then '' - ${oldAttrs.preFixup or ""} - - # Fix executable permissions in the app bundle - chmod +x "Contents/MacOS/Electron" - find Contents -type f -perm +111 -exec chmod +x {} \; - - # Make the app executable for Gatekeeper/notarization checks - xattr -d com.apple.quarantine . 2>/dev/null || true - '' else '' - ${oldAttrs.preFixup or ""} - - rm -rf resources/app/node_modules/@github/copilot-linuxmusl-x64 - ''; - - meta = (oldAttrs.meta or {}) // { - mainProgram = "code-insiders"; - - }; -}) \ No newline at end of file From 8ec0ec33cc775ec863d26eea6922bf4f3eaf17bc Mon Sep 17 00:00:00 2001 From: imnyang Date: Thu, 10 Sep 2026 02:05:04 +0900 Subject: [PATCH 3/4] pkgs/figma-linux: add Figma Desktop package --- README.md | 1 + flake.nix | 4 +++- pkgs/figma-linux/default.nix | 45 ++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 pkgs/figma-linux/default.nix diff --git a/README.md b/README.md index 2855a49..2508c95 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ imnyang's custom nixpkgs overlay. ## Included Packages - `helium`: Helium AppImage wrapper +- `figma-linux`: Figma Desktop for Linux - `helium-sync`: Helium Sync utility - `waterfox-bin`: Waterfox Browser - `xcursor-mizuki`: Custom cursor diff --git a/flake.nix b/flake.nix index e3665bf..33506aa 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ xcursor-mizuki = final.callPackage ./pkgs/xcursor-mizuki/default.nix { }; pjsk-cursor = final.callPackage ./pkgs/pjsk-cursor/default.nix { }; helium = final.callPackage ./pkgs/helium/default.nix { }; + figma-linux = final.callPackage ./pkgs/figma-linux/default.nix { }; }; forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f ( @@ -37,7 +38,8 @@ waterfox-bin xcursor-mizuki pjsk-cursor - helium; + helium + figma-linux; }; in nixpkgs.lib.filterAttrs (name: pkg: diff --git a/pkgs/figma-linux/default.nix b/pkgs/figma-linux/default.nix new file mode 100644 index 0000000..d0b1a17 --- /dev/null +++ b/pkgs/figma-linux/default.nix @@ -0,0 +1,45 @@ +{ + appimageTools, + fetchurl, + lib, +}: + +let + pname = "figma-linux"; + version = "126.5.6"; + + src = fetchurl { + url = "https://github.com/IliyaBrook/figma-linux/releases/download/${version}/figma-desktop-${version}-amd64.AppImage"; + hash = "sha256-SLn4y+NVCcBDZrGqIpmpIEQavY7xngt5JMI8yG1g6/0="; + }; + + appimageContents = appimageTools.extract { inherit pname version src; }; +in +appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + install -Dm444 ${appimageContents}/usr/share/applications/io.github.nickvdp.figma-desktop-linux.desktop \ + -t $out/share/applications + substituteInPlace $out/share/applications/io.github.nickvdp.figma-desktop-linux.desktop \ + --replace-fail 'Exec=AppRun' 'Exec=${pname}' + + install -Dm444 ${appimageContents}/io.github.nickvdp.figma-desktop-linux.png \ + $out/share/icons/hicolor/256x256/apps/io.github.nickvdp.figma-desktop-linux.png + ''; + + extraPkgs = pkgs: with pkgs; [ + libappindicator-gtk3 + libnotify + libsecret + ]; + + meta = { + description = "Figma Desktop for Linux"; + homepage = "https://github.com/IliyaBrook/figma-linux"; + license = lib.licenses.unfree; + mainProgram = "figma-linux"; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +} From 719080e04c91a24b928ca0158f950a2e04a20c8e Mon Sep 17 00:00:00 2001 From: imnyang Date: Mon, 14 Sep 2026 11:07:35 +0900 Subject: [PATCH 4/4] wow --- pkgs/figma-linux/default.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/figma-linux/default.nix b/pkgs/figma-linux/default.nix index d0b1a17..08e7b54 100644 --- a/pkgs/figma-linux/default.nix +++ b/pkgs/figma-linux/default.nix @@ -13,10 +13,22 @@ let hash = "sha256-SLn4y+NVCcBDZrGqIpmpIEQavY7xngt5JMI8yG1g6/0="; }; - appimageContents = appimageTools.extract { inherit pname version src; }; + appimageContents = appimageTools.extract { + inherit pname version src; + + # The upstream AppImage registers an AppImage-specific desktop entry at + # runtime. That bypasses this package's FHS wrapper when a figma:// URL is + # opened, so Electron cannot find libraries such as libnspr4.so. + postExtract = '' + substituteInPlace $out/AppRun \ + --replace-fail 'integrate_desktop 2>/dev/null || true' \ + 'true # Desktop integration is provided by the Nix package' + ''; + }; in -appimageTools.wrapType2 { - inherit pname version src; +appimageTools.wrapAppImage { + inherit pname version; + src = appimageContents; extraInstallCommands = '' install -Dm444 ${appimageContents}/usr/share/applications/io.github.nickvdp.figma-desktop-linux.desktop \