I've never felt the urge to use a self argument when doing overrides, usually just oldAttrs: rec { ... } works for me. It's to the point that I'm wondering if it's worth it, nix runs perfect but so does void, arch, redcore, debian.

https://github.com/NixOS/nixpkgs/pull/46842, overrideDerivation is used to override the call to derivation, overrideAttrs is used to override the call to stdenv.mkDerivation. I can't find docs in-tree, in the manual, in commit messages or PR comments, and I see only extension = self: super: {} being passed for that arg. Another data point that, unfortunately, just makes things even more confusing (at least in my mind).

Can I request that this be cherry-picked to 16.09/stable?

That's an awesome change. # Need to get rid of these when cross-compiling. By using the --store parameter in nix 2.0 or PRoot, you can use Nix on systems where you have no permission to create the `/nix` directory. Install custom or older versions of package(Ruby or Node or any other) using nix by overriding the package derivation using overrideAttrs, Tech Entrepreneur, dating Elixir, in long-term ❤️ w/ Ruby, had multiple one night stands w/ Go. Perhaps it is as simple as the overlay stack accidentally being duplicated somewhere? # emacs26 = with pkgs; self.emacs26_base.overrideAttrs(attrs: rec {.

$ nix-env -qaP ruby nixpkgs.ruby_2_5 ruby-2.5.8 nixpkgs.ruby ruby-2.6.6 nixpkgs.rubyMinimal ruby-2.6.6 nixpkgs.ruby_2_7 ruby-2.7.1 So I need to find a way to install ruby-2.2.2 using nix. overrideAttrs and overlays don't play well together (overrides get invoked twice).

they can be mix-and-matched. - yea we all have. Nix syntax supports URLs as verbatim, so one can write https://example.com instead of "https://example.com". My local Nix configuration. override is used to override the last function call. Another data point.

I have completely forgot about this, sorry. NixOS. Sign in Moved it down into the overlay function itself to fix this. Extracted out of #17886, as this seems to have existing support (e.g. From my point of view the only way this could happen is if the overlay is listed twice, or included twice. results. Both inside a overrideAttrs and outside of overrideAttrs in an overlay. I think the main performance impact of the old patch (and probably of your new one) was adding things to makeOverridable, therefore effectively growing closure of every function wrapped in it. Add this suggestion to a batch that can be applied as a single commit. Possibly stdenvOverrides should always be at the end of overlays list in stage.nix.

This PR https://github.com/NixOS/nixpkgs/pull/46842 discusses the idea to have a generic overrideArgs that works like overridePythonAttrs for all language infrastructures. overrideAttrs (attrs: {NIX_CFLAGS_COMPILE = (attrs. After a bit of tweaking and skipping the patches it worked, and I did not have to try installing ruby 2.2.2 on host or setting up a docker image for that. overridePythonAttrs is used to override the call to buildPython*. Already on GitHub? There is no darkmode and with calibres light colours it looks old and chucky far from fresh and beautiful, darkmode is simple to add on most distros but in nix even as root I get read only. But then again, ruby 2.2.2 is outdated, and nixpkgs does not maintain those patches any more. Press question mark to learn the rest of the keyboard shortcuts, https://github.com/NixOS/nixpkgs/blob/f9a5d8539d6210d273783686dca6314ddab57d12/pkgs/applications/editors/neovim/wrapper.nix, https://github.com/NixOS/nixpkgs/blob/f9a5d8539d6210d273783686dca6314ddab57d12/pkgs/top-level/all-packages.nix#L23154. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. to your account. I wrote a quick benchmarking script. Can you help me pick a few (important) packages that currently use overrideDerivation that I can bench after switching to overrideAttrs? overrideAttrs (oldAttrs: {buildInputs = oldAttrs. I think right after the 16.09 release is a good time to get this in since it's a replacement for (most uses of) overrideDerivation, allowing time before the next release to update references in the code and docs, etc. I know it's not the right version b/c that version of neovim is unaware of 'tagfunc' (which is why I need a later version anyway). Already on GitHub? By clicking “Sign up for GitHub”, you agree to our terms of service and I was trying to setup the project using nix, but unfortunately nix does not support ruby 2.2.2 now. This manual primarily describes how to write packages for the Nix Packages collection (Nixpkgs). Suggestions cannot be applied while the pull request is closed. Just noticed my overlay invoked trace above is actually a file loaded trace. One recommended way of doing that is using pinned versions. hello.

We still don't have a way for the two-argument style on most places. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Issue description @michaelpj @Ericson2314 If you do an overrideAttrs in a overlay, it gets applied twice.

Please run nix-shell -p nix-info --run "nix-info -m" and paste the Contribute to jwiegley/nix-config development by creating an account on GitHub.

Perhaps we should introduce some new parallel naming for using this more powerful style. Bringing them forward into the next stage results in the all the overlay stack following stdenvOverrides (which is currently [ configOverrides ] ++ overlays) being applied to them again. Here is an example. I also see very little use for overrideDerivation, now that we have this, as the derive primitive is hidden too deep in typical expressions. It seems to somehow come from/through the stdenvOverrides stage. Adding trace calls shows that the close passed to overlayAttrs get invoked twice even though the overlay itself only gets invoked once.

they can be I want to add a makeFlag to the Firefox package using Nixpkgs overlays, but it seems to be non-trivial. Adding compiler flags to a package.

@aneeshusa sorry for being slow to respond. lib. Note that this is actually a general issue for the whole bootstrapping stdenv.overrides overlay system. Into functional paradigms DDD/CQRS/EventSourcing architecture these days. Things done Tested using sandboxing (nix.useSandbox on NixOS, or option build-use … @nbp What old version of nixpkgs do you have that doesn't exhibit this issue? You must change the existing code in this line in order to create a valid suggestion. Before then I can't get overlays to work at all. perl -i -pe "s%/usr/share%$out%;" local.mk, -e "s|^\(\(DEST_\)\?PREFIX\)=. # [ "--enable-checking=yes,glyphs" "--enable-check-lisp-object-type" ]; # emacs26DebugPackagesNg = mkEmacsPackages self.emacs26debug; # url = "mirror://gnu/emacs/pretest/${name}.tar.xz"; # sha256 = "1x0z9hfq7n88amd32714g9182nfy5dmz9br0pjqajgq82vjn9qxk"; sed -i -e 's/headerpad_extra=1000/headerpad_extra=2000/' configure || \, (sed -i -e 's/headerpad_extra=1000/headerpad_extra=2000/' configure.ac; autoreconf), sed -i -e 's/headerpad_extra=1000/headerpad_extra=2000/' configure, # ./emacs/tramp-detect-wrapped-gvfsd.patch, sed -i -e 's/headerpad_extra=1000/headerpad_extra=2000/' configure.ac, # (self.emacs26PackagesNg.emacsWithPackages myPkgs), # emacs26DebugEnv = myPkgs: pkgs.myEnvFun {, # (self.emacs26DebugPackagesNg.emacsWithPackages myPkgs). Instantly share code, notes, and snippets.

*$|\1=$out|g ; \, Proof General is a generic front-end for proof assistants (also known as. Installing without root permissions.

Okay, I think I may have wrapped my head around this one. So that was out of the equation.

rec { .. } in general is kind of a smell for this reason.