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
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, gobject-introspection
|
|
, wrapGAppsHook
|
|
, python3
|
|
, ibus
|
|
}:
|
|
|
|
let
|
|
python = python3.withPackages (ps: with ps; [
|
|
pygobject3
|
|
(toPythonModule ibus)
|
|
pyxdg
|
|
python-Levenshtein
|
|
]);
|
|
in stdenv.mkDerivation rec {
|
|
pname = "ibus-uniemoji";
|
|
version = "0.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "salty-horse";
|
|
repo = "ibus-uniemoji";
|
|
rev = "v${version}";
|
|
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
|
|
};
|
|
|
|
patches = [
|
|
# Do not run wrapper script with Python,
|
|
# the wrapped script will have Python in shebang anyway.
|
|
./allow-wrapping.patch
|
|
];
|
|
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook
|
|
gobject-introspection
|
|
];
|
|
|
|
buildInputs = [
|
|
python
|
|
ibus
|
|
];
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder ''out''}"
|
|
"SYSCONFDIR=${placeholder ''out''}/etc"
|
|
"PYTHON=${python.interpreter}"
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapGApp $out/share/ibus-uniemoji/uniemoji.py
|
|
'';
|
|
|
|
meta = with lib; {
|
|
isIbusEngine = true;
|
|
description = "Input method (ibus) for entering unicode symbols and emoji by name";
|
|
homepage = "https://github.com/salty-horse/ibus-uniemoji";
|
|
license = with licenses; [ gpl3 mit ];
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ aske ];
|
|
};
|
|
}
|