telegram-desktop-patches icon indicating copy to clipboard operation
telegram-desktop-patches copied to clipboard

Override for nixpkgs

Open shwewo opened this issue 1 year ago • 3 comments

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 avatar Feb 08 '24 08:02 shwewo