4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ lib, stdenv, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "wee-slack";
|
|
version = "2.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "wee-slack";
|
|
owner = "wee-slack";
|
|
rev = "v${version}";
|
|
sha256 = "0s4qd1z40c1bczkvc840jwjmzbv7nyj06xqs1si9v54qmkh4gaq4";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./libpath.patch;
|
|
env = "${buildEnv {
|
|
name = "wee-slack-env";
|
|
paths = with python3Packages; [ websocket_client six ];
|
|
}}/${python3Packages.python.sitePackages}";
|
|
})
|
|
./hardcode-json-file-path.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace wee_slack.py --subst-var out
|
|
'';
|
|
|
|
passthru.scripts = [ "wee_slack.py" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share
|
|
cp wee_slack.py $out/share/wee_slack.py
|
|
install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/wee-slack/wee-slack";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ willibutz ];
|
|
description = ''
|
|
A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc..
|
|
'';
|
|
};
|
|
}
|