Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override for nixpkgs #4

Open
shwewo opened this issue Feb 8, 2024 · 3 comments
Open

Override for nixpkgs #4

shwewo opened this issue Feb 8, 2024 · 3 comments

Comments

@shwewo
Copy link

shwewo commented Feb 8, 2024

I overriden nixpkgs's telegram-desktop for use in nix(os). People with nix package manager and home manager can just install it and it'll compile automatically. It compiles and works, so is it possible to add this in README?

  environment.systemPackages = with pkgs; [
    # other stuff goes here

    (telegram-desktop.overrideAttrs (oldAttrs: {
      patches = (oldAttrs.patches or []) ++ [
        (fetchpatch {
          url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0001-Disable-sponsored-messages.patch";
          hash = "sha256-o2Wxyag6hpEDgGm8FU4vs6aCpL9aekazKiNeZPLI9po=";
        })
        (fetchpatch {
          url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0002-Disable-saving-restrictions.patch";
          hash = "sha256-sQsyXlvhXSvouPgzYSiRB8ieICo3GDXWH5MaZtBjtqw=";
        })
        (fetchpatch {
          url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0003-Disable-invite-peeking-restrictions.patch";
          hash = "sha256-8mJD6LOjz11yfAdY4QPK/AUz9o5W3XdupXxy7kRrbC8="; 
        })
        (fetchpatch {
          url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0004-Disable-accounts-limit.patch";
          hash = "sha256-PZWCFdGE/TTJ1auG1JXNpnTUko2rCWla6dYKaQNzreg=";
        })
      ];
    }))
  ];
@shwewo
Copy link
Author

shwewo commented Feb 21, 2024

i wrote a flake to use on nix systems for anyone looking: https://github.com/shwewo/telegram-desktop-patched

@Layerex
Copy link
Owner

Layerex commented Jun 2, 2024

43c095f

@shwewo
Copy link
Author

shwewo commented Sep 5, 2024

Also binary version for anyone looking https://github.com/shwewo/tgstatic
Should work without external libraries on any distro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants