# Using overlay to bump android-studio version

**URL:** https://discourse.nixos.org/t/using-overlay-to-bump-android-studio-version/58717
**Category:** Help
**Created:** [January 12, 2025, 11:25pm UTC](https://discourse.nixos.org/t/using-overlay-to-bump-android-studio-version/58717 "2025-01-12T23:25:56Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [January 13, 2025, 1:20pm UTC](https://discourse.nixos.org/t/using-overlay-to-bump-android-studio-version/58717/6 "2025-01-13T13:20:04Z")

</div>

> [@Atemu](#):
>
> I don’t use flakes but I know it’s possible to apply patches to flake inputs.

Generically it’s _not_ possible to do so with only a flake input.

> <https://github.com/NixOS/nix/issues/3920>
>
> \*\*Describe the bug\*\*
> 
> There is a patch in nixpkgs https://github.com/NixOS/nix…pkgs/pull/59990 "Support patching nixpkgs" which is meant to support users who track a specific branch of nixpkgs (like nixpkgs-unstable or some release branch) but you would like to apply some unmerged pull requests or some other patches to that revision. This is really common flow for linux users in general. What people currently do is fork nixpkgs, create a branch based on your desired upstream branch and cherry-pick the commits you need on top of that branch. Then everytime you need to upgrade nixpkgs you rebase your branch on the latest upstream branch that you're tracking. IMHO a kinda consuming process if you just want a few patches.
> 
> Overall, this patch was a :-1: from @edolstra who commented the following as the most early retort:
> 
> \> I'm -1 on this. It seems very ad hoc and hacky to make Nixpkgs rewrite its own source tree. That's the job of the version management tool (e.g. Git), which can do a much better job of managing sources and patches.
> \>
> \> Maybe flakes could provide this functionality (e.g. by having a flake reference like github:NixOS/nixpkgs?patch=./foo.patch) but I'm convinced it's a good idea.
> 
> This idea with flakes piqued my interest as possible, though.
> 
> @edolstra did eventually see the usefulness of such a functionality after the following comments https://github.com/NixOS/nixpkgs/pull/59990#issuecomment-490876722 https://github.com/NixOS/nixpkgs/pull/59990#issuecomment-490882052
> 
> I've opened this issue, as I'm not entirely sure how this should look like with flakes, but it is certainly something I'd like to have and would be an instant user of (and judging from the thumbs up on the PR in nixpkgs it would be welcome to many others).
> 
> \*\*Pinging people from https://github.com/NixOS/nixpkgs/pull/59990\*\*
> @basvandijk @volth @edolstra

For nixpkgs we have `applyPatches` as mentioned above, at least. But IMO the usecase presented in the wiki is a bit silly, an override would make more sense for just bumping a single package’s version.

Since OP’s usecase is exactly the same - just use an override!  
[https://nixos.org/manual/nixpkgs/unstable/#sec-pkg-overrideAttrs](https://nixos.org/manual/nixpkgs/unstable/#sec-pkg-overrideAttrs)

And @JBassett if you are stuck, post full code and full errors, no paraphrasing.

---

_[View the full topic](https://discourse.nixos.org/t/using-overlay-to-bump-android-studio-version/58717)._
