nixpkgs/pkgs
Alyssa Ross 8887e1f697
weechat: seperate weechat-unwrapped from wrapper
If I have a patch I want to apply to weechat, I can't do that with
overrideAttrs like I can with almost every other package, because that
only applies to the wrapper derivation. For other wrapped packages, one
can usually call the wrapper with any version of the derivation, but the
weechat derivation didn't expose a wrapper creation function.

Taking inspiration from other packages, particularly Firefox, I
extracted the wrapper into its own function, made the default weechat
derivation use that, and added weechat-unwrapped.

Now I can add my custom patch like this:

    (wrapWeechat
      (weechat-unwrapped.overrideAttrs (oldAttrs: {
        patches = [
          (fetchpatch {
            url = "55767f5f11.patch?full_index=1";
            sha256 = "1pkcdsby57diqds1y5hhl0fr4i8j0zax32jb0gqd36siki3lza3d";
          })
        ];
      }))
      { configure =
        { availablePlugins, ... }:
        {
          plugins = with availablePlugins; [
            (python.withPackages (packages: with packages; [ potr websocket_client ]))
          ];
        };
      })

There is a small backward incompatibility here: previously, it was
possible to get an unwrapped weechat like this:

    weechat.override { configure = null; }

This didn't seem too important to keep around since it was also possible
to get an unwrapped weechat in a much more obvious way:

    weechat.unwrapped

I could probably make it so that the first way still worked, if that
behavior turns out to really have been important.
2018-07-25 17:49:00 +01:00
..
applications weechat: seperate weechat-unwrapped from wrapper 2018-07-25 17:49:00 +01:00
build-support Merge staging-next into master (#44009) 2018-07-24 15:04:48 +01:00
common-updater
data Merge staging-next into master 2018-07-22 11:04:28 +02:00
desktops gnome2.GConf: Add python2 dependency for gsettings-schema-convert 2018-07-25 11:23:55 +03:00
development haskell: move yaml overrides to configuration-nix 2018-07-25 15:17:56 +01:00
games Merge pull request #43774 from Infinisil/fix/minecraft 2018-07-25 12:32:00 +02:00
misc Merge pull request #43829 from eadwu/vscode-extensions.ms-python.python/2018.7.0 2018-07-24 23:37:42 +02:00
os-specific util-linux: No more crossAttrs 2018-07-24 19:40:46 -04:00
servers grafana: 5.2.1 -> 5.2.2 2018-07-25 17:47:50 +02:00
shells Merge pull request #43912 from r-ryantm/auto-update/powershell 2018-07-22 08:44:38 +02:00
stdenv cross stdenv: Forget allowedRequisites = nulll; on inline 2018-07-25 03:58:49 -04:00
test tests: add some cross tests 2018-07-21 17:00:05 -04:00
tools yaxg: init at 2018-07-20 2018-07-25 07:14:14 -07:00
top-level weechat: seperate weechat-unwrapped from wrapper 2018-07-25 17:49:00 +01:00