Skip to content

bitwarden-desktop: 2026.5.0 -> 2026.6.0, migrated to finalAttrs - #535399

Merged
dotlambda merged 2 commits into
NixOS:masterfrom
tree-sapii:bitwarden-desktop_update
Jun 28, 2026
Merged

dotlambda merged 2 commits into
NixOS:masterfrom
tree-sapii:bitwarden-desktop_update

Conversation

@tree-sapii

@tree-sapii tree-sapii commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Things done

https://github.com/bitwarden/clients/releases/tag/desktop-v2026.6.0
bitwarden/clients#20448 still not included, so still broken.

@tree-sapii

Copy link
Copy Markdown
Contributor Author

I am quite interested in maintaining this package, could I possible add myself as a maintainer?

@nixpkgs-ci
nixpkgs-ci Bot requested a review from amarshall June 25, 2026 21:36
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 25, 2026
@tree-sapii tree-sapii mentioned this pull request Jun 25, 2026
3 of 13 tasks
@eclairevoyant

Copy link
Copy Markdown
Contributor

I am quite interested in maintaining this package, could I possible add myself as a maintainer?

Just do it, you don't need permission.
But we can pull in the upstream patch, right? (https://github.com/bitwarden/clients/commit/2ebc5ef999384c365500742cd9e5372fb9543beb.patch)

@nyabinary

Copy link
Copy Markdown
Contributor

Can we just pull the electron update patch?

@tree-sapii

Copy link
Copy Markdown
Contributor Author

Yes I saw the patch is merged, I am testing it right now.

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from dbc0492 to d1e6af0 Compare June 26, 2026 00:07
@tree-sapii

Copy link
Copy Markdown
Contributor Author

Electron patch is successful.

@nixpkgs-ci nixpkgs-ci Bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jun 26, 2026
'';

nodejs = nodejs_22;
electron = electron_41;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Keep this in let, it does not need to be in the derivation attrs.

@tree-sapii tree-sapii Jun 26, 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.

Would it not limit overriding? I assume when migrating a package to finalAttrs, stuff usually located inside a let in block is moved out. ( I may be wrong, I am new (sorry))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

override already works because it works on the function args, whereas overrideAttrs works on the derivation attrs (and would not normally be expected to work for overriding dependencies). So it’s fine in the let. Of course it would be bitwarden-desktop.override { electron_41 = whatever }, since, again, it’s the fn params. The let is just for convenience when updating the input param to not have to update N references to it electron_39→electron_41.

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 see, thanks, I assumed that if someone were to want to override both the electron version and something in the drv, they would have to call both functions so I moved it inside to not have have that happen.

@amarshall amarshall Jun 26, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That is normal and expected. Overriding an input with overrideAttrs is atypical. Ask yourself: if electron, why not then add every input to the output attrs? Why does every derivation not do that.

Yes, using override+overrideAttrs can be awkward, but it’s less awkward than the confusion of mixing fn params and derivation attrs. IMO, attrs that are not used by the function (in this case buildNpmPackage, but usually stdenv.mkDerivation) should be avoided to reduce confusion about their purpose; i.e., seeing it there makes me ask: “how does buildNpmPackage use the electron attr?” (it doesn’t, ofc). This has precedent in the move to env and the use of passthru and meta. The case where it’s useful to add to passthru is if it is expected some consumer would need to refer to it (which is not the case with bitwarden-desktop).

inherit icon;
comment = description;
icon = "bitwarden";
comment = finalAttrs.meta.description;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some folks think that meta should not be derived into the output, but afaik this is fine (but I can be convinced it’s bad).

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.

I think it's not worth nitting here; we should probably do a treewide + set a policy if it's really that bad.

@amarshall

Copy link
Copy Markdown
Member

I will want to do some testing on this, especially with the patch. I know they had some issues upstream that delayed the update, and it’s not clear to me yet if there are changes not in this release that the update depends on.

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from d1e6af0 to c242efa Compare June 26, 2026 03:31
@tree-sapii

Copy link
Copy Markdown
Contributor Author

The patch confirmed didn't work, sadly.

@dotlambda dotlambda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The order of the commits is wrong and the commit adding yourself to the maintainer list should only touch that file.
Also, please follow https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions.

@dotlambda

Copy link
Copy Markdown
Member

The patch confirmed didn't work, sadly.

In which sense? It doesn't apply or the app doesn't work with it applied? Did it apply when you vendored the patch?

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 26, 2026
@tree-sapii

Copy link
Copy Markdown
Contributor Author

The patch confirmed didn't work, sadly.

In which sense? It doesn't apply or the app doesn't work with it applied? Did it apply when you vendored the patch?

My vendored patch didn't apply ( probably due to caching ) despite being included, and I was under the impression it worked, now with fetchpatch, results in this:

bitwarden-desktop-2026.6.0-npm-deps> patching file package-lock.json
bitwarden-desktop-2026.6.0-npm-deps> Hunk #1 succeeded at 81 with fuzz 2.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #3 FAILED at 6944.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #4 FAILED at 7020.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #5 succeeded at 5291 (offset -1864 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #6 succeeded at 5355 (offset -1864 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #7 FAILED at 7249.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #8 FAILED at 7275.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #9 FAILED at 7292.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #10 FAILED at 19390.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #11 succeeded at 16162 with fuzz 2 (offset -3504 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #12 succeeded at 16954 (offset -3106 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #13 succeeded at 16971 (offset -3106 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #14 succeeded at 17001 (offset -3106 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #15 FAILED at 20251.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #16 FAILED at 20338.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #17 FAILED at 20367.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #18 succeeded at 18457 (offset -3472 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #19 succeeded at 18482 (offset -3472 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #20 FAILED at 24809.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #21 succeeded at 21222 (offset -3631 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #22 FAILED at 24925.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #23 succeeded at 21586 (offset -3623 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #24 succeeded at 21605 (offset -3623 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #25 succeeded at 21631 (offset -3623 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #26 succeeded at 21688 (offset -3620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #27 succeeded at 21874 (offset -3620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #28 succeeded at 21992 (offset -3620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #29 FAILED at 27477.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #30 FAILED at 27487.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #31 FAILED at 30578.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #32 FAILED at 30596.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #33 succeeded at 32395 with fuzz 2 (offset -5093 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #34 FAILED at 37636.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #35 succeeded at 35608 with fuzz 1 (offset -5341 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #36 FAILED at 42422.
bitwarden-desktop-2026.6.0-npm-deps> Hunk #37 FAILED at 44998.
bitwarden-desktop-2026.6.0-npm-deps> 18 out of 37 hunks FAILED -- saving rejects to file package-lock.json.rej
bitwarden-desktop-2026.6.0-npm-deps> patching file package-lock.json
bitwarden-desktop-2026.6.0-npm-deps> Hunk #2 succeeded at 5130 (offset -586 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #3 succeeded at 5234 (offset -586 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #4 succeeded at 14925 (offset -600 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #5 succeeded at 18364 (offset -600 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #6 succeeded at 21542 (offset -620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #7 succeeded at 23546 (offset -620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #8 succeeded at 23761 (offset -620 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #9 succeeded at 34290 (offset -616 lines).
bitwarden-desktop-2026.6.0-npm-deps> Hunk #10 succeeded at 43760 (offset -590 lines).
bitwarden-desktop-2026.6.0-npm-deps> patching file package.json
bitwarden-desktop-2026.6.0-npm-deps> Hunk #1 succeeded at 53 with fuzz 2.
bitwarden-desktop-2026.6.0-npm-deps> patching file package.json

from:

    (fetchpatch2 {
      url = "https://patch-diff.githubusercontent.com/raw/bitwarden/clients/pull/20448.patch";
      hash = "sha256-6puP5XH8/LFPtst4/hBlHz2ZmKB+4bkGDY3qTk65sOo=";
    })

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from c242efa to 1196b02 Compare June 26, 2026 03:50
@dotlambda dotlambda changed the title bitwarden-desktop: v2026.5.0 -> v2026.6.0, migrated to finalAttrs bitwarden-desktop: 2026.5.0 -> 2026.6.0, migrated to finalAttrs Jun 26, 2026
@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from 1196b02 to 809460a Compare June 26, 2026 03:54
@tree-sapii

Copy link
Copy Markdown
Contributor Author

All the comments should be handled I supposed, I am sorry for all the trouble!.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 26, 2026
@dotlambda

Copy link
Copy Markdown
Member

All the comments should be handled I supposed

Not at all: #535399 (review)

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from 809460a to 16b41ad Compare June 26, 2026 04:28
@dotlambda

Copy link
Copy Markdown
Member

You still have the v in the commit message.

@tree-sapii

Copy link
Copy Markdown
Contributor Author

You still have the v in the commit message.

is it required to be just the numbers?

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from 16b41ad to cb0a216 Compare June 26, 2026 04:40
@tree-sapii

Copy link
Copy Markdown
Contributor Author

I am not sure why the action doesn't like the format of the maintainer list, my entry seems the same like all the others.

@dotlambda

Copy link
Copy Markdown
Member

It's not ordered alphabetically.

@tree-sapii
tree-sapii force-pushed the bitwarden-desktop_update branch from cb0a216 to 63ba323 Compare June 26, 2026 06:04
@SuperSandroBot

This comment was marked as off-topic.

@SFrijters

Copy link
Copy Markdown
Member

The patch confirmed didn't work, sadly.

In which sense? It doesn't apply or the app doesn't work with it applied? Did it apply when you vendored the patch?

My vendored patch didn't apply ( probably due to caching ) despite being included, and I was under the impression it worked, now with fetchpatch, results in this:
[...]

How about bumping to 2026.6.0-unstable-2026-06-26 at 30f00bea29f6b93fde5cd69677dcbddf00426da2 instead (latest master commit at time of writing), or to 2ebc5ef999384c365500742cd9e5372fb9543beb (commit which adds the electron version bump, also on master)?

Personally I value getting rid of electron_39 quite highly - more than picking a released version in this instance.

@damidoug

Copy link
Copy Markdown
Contributor

Look at my PR: #536329 maybe help.

@tree-sapii

tree-sapii commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor Author

How about bumping to 2026.6.0-unstable-2026-06-26 at 30f00bea29f6b93fde5cd69677dcbddf00426da2 instead (latest master commit at time of writing), or to 2ebc5ef999384c365500742cd9e5372fb9543beb (commit which adds the electron version bump, also on master)?
Personally I value getting rid of electron_39 quite highly - more than picking a released version in this instance.

Would have to be tested to make sure everything works, however as solution until we get a official release with electron 41, this seems best. Thanks!

@dotlambda

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 535399
Commit: 63ba3230afaf2e6833d2438f49470ebebeff8174


x86_64-linux

✅ 1 package built:
  • bitwarden-desktop

@dotlambda
dotlambda added this pull request to the merge queue Jun 28, 2026
Merged via the queue into NixOS:master with commit 8919a8e Jun 28, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants