• 1 Post
  • 10 Comments
Joined 1 year ago
cake
Cake day: June 6th, 2023

help-circle




  • Bumping package versions usually isn’t hard. Here, I’ll do this one out loud here, & maybe you can do it next time you need to:

    1. Search https://github.com/NixOS/nixpkgs/pulls to see if someone else already has a PR open for a version bump for this package.
    2. Clone the nixpkgs repo if you haven’t already: git clone https://github.com/NixOS/nixpkgs.git ~/devel/nixpkgs (or git pull if you have).
    3. Create a branch for this bump: git checkout -b stremio
    4. Find stremio: find pkgs -name stremio
    5. Edit it: $EDITOR pkgs/applications/video/stremio/default.nix Looks like nixpkgs has version 4.4.142. If I go to https://www.stremio.com/ (link in meta.homepage in this file) and click ‘Download’, it all says 4.4, which is not helpful. The ‘source code’ link goes to github, and the ‘tags’ link there lists version v4.4.164, which is what we’re looking for.
    6. In my editor, I change the version: 4.4.1424.4.164.
    7. In my editor, I mess up both the hashes: I just add a block of zeros somewhere in the middle: sha256-OyuTFmEIC8PH4PDzTMn8ibLUAzJoPA/fTILee0xpgQI=sha256-OyuTFmEIC80000000000000000000A/fTILee0xpgQI=.
    8. Leaving my editor, I build the updated package: nix-build . -A stremio
    9. It fails, because the hashes are wrong, obviously. But it tells me what hash it got, which I copy/paste back in, in the spirit of collective TOFU. I do this twice, once for each hash.
    10. It builds successfully. I test the result: ./result/bin/stremio. Looks like it works enough to prompt me to log in, at least. I don’t know what stremio is or have an account, but it’s probably fine.
    11. I commit my change: git commit -a -m 'stremio: 4.4.142 -> 4.4.164'
    12. I push my commit: git push github (If this is your first time, create a fork of nixpkgs in the github web UI & git remote add a remote for it first)
    13. I create PR in the github web UI: https://github.com/NixOS/nixpkgs/pull/263387

  • chkno@lemmy.mltoLinux@lemmy.mlWayland or X11? Why?
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    1 year ago

    X11 for xdotool. ydotool doesn’t support (& can’t really support with it’s current architecture) retrieving information like the current mouse location, current window, window dimensions & titles. Also, normal (unprivileged) user ydotool use requires udev rules or session scripts and/or running a ydotool daemon & many distros don’t yet ship with this Just Working.

    X11 for Alt-F2 r to restart Gnome Shell without ending the whole session. This is a useful workaround for a variety of Gnome bugs.