diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-07-13 22:00:09 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-07-13 23:10:03 +0000 |
commit | add8759f14c9ebb65bca21a95e317e4316d3f6be (patch) | |
tree | 3a67356df4b197a7add4034478499bc91d2258dc /overlays/patches/tmux | |
parent | 424dfb57297d0d1af4467571b8d739b08b02fca8 (diff) | |
download | nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.gz nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.bz2 nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.lz nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.xz nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.zst nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.zip |
overlays: don't apply to all nixpkgs trees
Since the nixlib root is the NIX_PATH root, overlays were in the NIX_PATH as "nixpkgs-overlays". Nixpkgs imports that by default to look for overlays. This meant that an arbitrary Nixpkgs tree would end up trying to use the Nixlib overlays, which wouldn't always work. It would also mean that derivations built from those trees wouldn't match the ones other people would try to build, which is undesirable for working on nixpkgs. I think this is unfortunate behaviour for anybody working on nixpkgs, and nixpkgs probably shouldn't load overlays from impurely at all by default, but it is what it is. Since I can't really change what upstream nixpkgs does here, the best I can do is change the nixpkgs in nixlib. It will now load overlays from a sibling "overlays" directory. Renaming the "nixpkgs-overlays" directory at the nixlib root to "overlays" means that it will be loaded by default _only_ by the nixpkgs it is colocated with. It also means that it is still accessible in the NIX_PATH as <overlays>, which is fine and convenient as long as nothing starts looking at that by default.
Diffstat (limited to 'overlays/patches/tmux')
-rw-r--r-- | overlays/patches/tmux/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/overlays/patches/tmux/default.nix b/overlays/patches/tmux/default.nix new file mode 100644 index 000000000000..cc13ac2a86c2 --- /dev/null +++ b/overlays/patches/tmux/default.nix @@ -0,0 +1,7 @@ +{ tmux }: + +tmux.overrideAttrs ({ CPPFLAGS ? [], ... }: { + CPPFLAGS = CPPFLAGS ++ [ + ''-DTMUX_CONF="\"\$$XDG_CONFIG_HOME/tmux/tmux.conf"\"'' + ]; +}) |