Skip to content

losslesscut: 3.69.0 -> 3.70.1; fix update script; use dynamic patching - #578801

Merged
ShamrockLee merged 7 commits into
NixOS:masterfrom
ShamrockLee:losslesscut-update-3.70.1
Oct 30, 2026
Merged

ShamrockLee merged 7 commits into
NixOS:masterfrom
ShamrockLee:losslesscut-update-3.70.1

Conversation

@ShamrockLee

@ShamrockLee ShamrockLee commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
  1. Convert most patches to substitution to facilitate updating.
  2. Fix the update script.
    Use --src-only to update src first (without touching offlineCache) to allow subsequent update of missing-hashes.json and offlineCache.
    (discovered and fixed with LLM assistance)
  3. Version bump 3.69.0 -> 3.70.1
    Following fix-ups:
    • Remove the yarn-berry yarn.lock version workaround.
    • Disable afterPack during build process, as it expects the bundled FFmpeg.
      (discovered and fixed with LLM assistance)

Most of the diffs were hand-written. LLM assistance were mainly for debugging and is disclosed above.

Initial efforts for testing and landing upstream PR mifi/lossless-cut#3180 for Electron version bump 42 -> 45 to address Electron 42 EOL (issue #576496)

Things done

@ShamrockLee
ShamrockLee requested a review from shelvacu October 25, 2026 13:39
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". llm-assisted Contributions that include code generation with LLMs labels Oct 25, 2026
@ShamrockLee
ShamrockLee force-pushed the losslesscut-update-3.70.1 branch from b555466 to aba6923 Compare October 25, 2026 14:52
@ShamrockLee ShamrockLee mentioned this pull request Oct 25, 2026
6 of 13 tasks
@nixpkgs-review-gha

Copy link
Copy Markdown

✅ nixpkgs-review result

Generated using nixpkgs-review-gha (b0ab82d)

Command: nixpkgs-review pr 578801
Commit: aba6923bbd29de3b1f4ef6944fb05ce5e9e065f3 (subsequent changes)
Merge: 4e9df8ae7a4bcc1cf2d341e2ba4efe010c185e7c

Triggered by @ShamrockLee (44064051)
Logs: https://github.com/ShamrockLee/nixpkgs-review-gha/actions/runs/40204341426/attempts/1


x86_64-linux

✅ 1 package built:
  • losslesscut

aarch64-linux

✅ 1 package built:
  • losslesscut

aarch64-darwin

✅ No rebuilds

@shelvacu

Copy link
Copy Markdown
Contributor

Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

I think you forgot to check this

will review in a bit

@ShamrockLee

Copy link
Copy Markdown
Contributor Author

Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

I think you forgot to check this

The nixpkgs-review jobs were still running when I ticked the boxes.
IIRC, CONTRIBUTING.md requires PRs to go through nixpkgs-review, so I didn't check it.

will review in a bit

Thank you.

};

patches = [
# fixes a few things that try to guess whether it's a dev build
./undev.patch
./disable-update-check.patch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • files are now unused, should remove them
  • this removes a change to the settings dialog that makes it clear that "check for updates" doesn't work. I'd like to keep that.

@ShamrockLee ShamrockLee Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this removes a change to the settings dialog that makes it clear that "check for updates" doesn't work. I'd like to keep that.

Do you mean this one

diff --git i/src/main/configStore.ts w/src/main/configStore.ts
index 3a80d2aa..b95546a9 100644
--- i/src/main/configStore.ts
+++ w/src/main/configStore.ts
@@ -154,7 +154,6 @@ const defaults: Config = {
   captureFrameQuality: 0.95,
   captureFrameFileNameFormat: 'timestamp',
   enableNativeHevc: true,
-  enableUpdateCheck: true,
   cleanupChoices: {
     trashTmpFiles: true, askForCleanup: true, closeFile: true, cleanupAfterExport: false,
   },

or this one?

@@ -204,7 +204,7 @@ function Settings({
           <Row>
             <KeyCell>{t('Check for updates on startup?')}</KeyCell>
             <td>
-              <Switch checked={enableUpdateCheck} onCheckedChange={setEnableUpdateCheck} />
+              (always disabled in nixpkgs build)
             </td>
           </Row>
         )}

I'll re-implement both in postPatch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-implemented the update script disabling logic.
Here are the difference between the patch and the substitution:

disable-update-check.patch removes the configuration option enableUpdateChecker, which inherently means patching every lines of code touching it.

The substitution method keeps the configuration option but replaces

  • Its default value: from true to false
  • The configuration getter: always return false for key 'enableUpdateChecker'.
  • The UI: See below.

disable-update-check.patch removes the switch from the "Files > Settings" UI.
The substitution method keep the switch but make it unchecked and non-interactive (grayed out).

Comment thread pkgs/by-name/lo/losslesscut/package.nix Outdated
local _pattern="$1"
shift
local _status=0
local _unreplacedFiles

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the underscore prefix? I know bash is bad about proper name scoping, but I don't think an underscore helps very much and local should be plenty here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also status can be declare -i status=0 and then even shellcheck won't complain about that variable unquoted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the underscore prefix?

It was a leftover from the time this block of code was not inside a Bash function.

I'll fix it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

@shelvacu

Copy link
Copy Markdown
Contributor

The nixpkgs-review jobs were still running when I ticked the boxes. IIRC, CONTRIBUTING.md requires PRs to go through nixpkgs-review, so I didn't check it.

Suggested but not required. Also that checkbox I think is more for new contributors, it could almost be "I have read..." instead. Whether or not you've run nixpkgs-review is a separate checkbox.

@teutat3s teutat3s mentioned this pull request Oct 27, 2026
27 of 38 tasks
@ShamrockLee
ShamrockLee force-pushed the losslesscut-update-3.70.1 branch from aba6923 to a95e6e1 Compare October 29, 2026 13:47
@ShamrockLee
ShamrockLee requested a review from shelvacu October 29, 2026 13:52
Reimplement the goal of disable-update-check.patch with substitution.

disable-update-check.patch removes
the configuration option enableUpdateChecker,
which inherently means patching every lines of code touching it.

The substitution method keeps the configuration option but replaces
* Its default value: from `true` to `false`
* The configuration getter:
  always return false for key `'enableUpdateChecker'`.
* The UI: See below.

disable-update-check.patch removes the switch from the "Files > Settings" UI.

The substitution method keep the switch
but make it unchecked and non-interactive (grayed out).
Add --src-only to the first nix-update call.

Assisted-by: claude-code: claude-opus-5.5
Assisted-by: claude-code: claude-opus-5.5
@ShamrockLee
ShamrockLee force-pushed the losslesscut-update-3.70.1 branch from a95e6e1 to bee1876 Compare October 29, 2026 13:56

@shelvacu shelvacu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 30, 2026
@shelvacu

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 578801
Commit: bee187604a1676ece639e187330426e9ebbddd00


x86_64-linux

✅ 1 package built:
  • losslesscut

@nixpkgs-review-gha

Copy link
Copy Markdown

✅ nixpkgs-review result

Generated using nixpkgs-review-gha (b0ab82d)

Command: nixpkgs-review pr 578801
Commit: bee187604a1676ece639e187330426e9ebbddd00 (subsequent changes)
Merge: c4eaac78cc1185d097185a14d1ca1f0d113f05d6

Triggered by @ShamrockLee (44064051)
Logs: https://github.com/ShamrockLee/nixpkgs-review-gha/actions/runs/40204341426/attempts/2


x86_64-linux

✅ 1 package built:
  • losslesscut

aarch64-linux

✅ 1 package built:
  • losslesscut

aarch64-darwin

✅ No rebuilds

@ShamrockLee
ShamrockLee added this pull request to the merge queue Oct 30, 2026
Merged via the queue into NixOS:master with commit f66eff4 Oct 30, 2026
30 checks passed
@ShamrockLee
ShamrockLee deleted the losslesscut-update-3.70.1 branch October 30, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants