2024-03-11 07:53:48 +00:00
|
|
|
# earlier attempt to upstream: <https://github.com/NixOS/nixpkgs/pull/211874>
|
2022-12-16 07:46:06 +00:00
|
|
|
{ lib
|
2023-01-18 11:24:40 +00:00
|
|
|
, bash
|
2022-12-16 07:46:06 +00:00
|
|
|
, fetchFromGitHub
|
2023-01-18 11:24:40 +00:00
|
|
|
, fpm
|
|
|
|
, jq
|
|
|
|
, pandoc
|
|
|
|
, shunit2
|
|
|
|
, stdenv
|
2022-12-16 07:46:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "splatmoji";
|
|
|
|
version = "1.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cspeterson";
|
|
|
|
repo = "splatmoji";
|
|
|
|
rev = "v${version}";
|
2024-03-01 17:55:27 +00:00
|
|
|
hash = "sha256-fsZ8FhLP3vAalRJWUEi/0fe0DlwAz5zZeRZqAuwgv/U=";
|
2022-12-16 07:46:06 +00:00
|
|
|
};
|
|
|
|
|
2023-01-18 11:24:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bash
|
|
|
|
fpm
|
|
|
|
jq
|
|
|
|
pandoc
|
|
|
|
shunit2
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./build.sh
|
|
|
|
patchShebangs ./test/unit_tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2024-03-01 17:55:27 +00:00
|
|
|
runHook preBuild
|
2023-01-18 11:24:40 +00:00
|
|
|
./build.sh ${version} dir
|
2024-03-01 17:55:27 +00:00
|
|
|
runHook postBuild
|
2023-01-18 11:24:40 +00:00
|
|
|
'';
|
2022-12-16 07:46:06 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2024-03-01 17:55:27 +00:00
|
|
|
runHook preInstall
|
2023-01-18 11:24:40 +00:00
|
|
|
mkdir -p $out
|
|
|
|
cp -R build/usr/* $out
|
2022-12-16 07:46:06 +00:00
|
|
|
|
|
|
|
patchShebangs $out/bin/splatmoji
|
2023-01-18 11:24:40 +00:00
|
|
|
# splatmoji refers to its lib and data by absolute path
|
|
|
|
sed -i "s:/usr/lib/splatmoji:$out/lib/splatmoji:g" $out/bin/splatmoji
|
2023-01-18 11:53:14 +00:00
|
|
|
sed -i -r "s:/usr/share/+splatmoji:$out/share/splatmoji:g" $out/lib/splatmoji/functions
|
2024-03-01 17:55:27 +00:00
|
|
|
runHook postInstall
|
2022-12-16 07:46:06 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Quickly look up and input emoji and/or emoticons/kaomoji on your GNU/Linux desktop via pop-up menu";
|
|
|
|
homepage = "https://github.com/cspeterson/splatmoji";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ colinsane ];
|
2023-01-18 11:24:40 +00:00
|
|
|
platforms = platforms.linux;
|
2022-12-16 07:46:06 +00:00
|
|
|
};
|
2023-01-18 11:24:40 +00:00
|
|
|
}
|