splatmoji: actually install the .desktop files

This commit is contained in:
Colin 2024-03-01 17:55:27 +00:00
parent fca23e661a
commit 95c95d6f53
3 changed files with 15 additions and 7 deletions

View File

@ -6,6 +6,9 @@
{
sane.programs.splatmoji = {
packageUnwrapped = pkgs.splatmoji.overrideAttrs (upstream: {
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
pkgs.copyDesktopItems
];
desktopItems = (upstream.desktopItems or []) ++ [
(pkgs.makeDesktopItem {
name = "splatmoji";

View File

@ -141,12 +141,13 @@ in [
# hash = "sha256-oQEM3EZfAOmfZzDu9faCqyOFZsdHYGn1mVBgkxt68Zg=";
# })
(fetchpatch' {
title = "splatmoji: init at 1.2.0";
prUrl = "https://github.com/NixOS/nixpkgs/pull/211874";
saneCommit = "75149039b6eaf57d8a92164e90aab20eb5d89196";
hash = "sha256-abLakAWaRfc8tgu4IwUdR/w8GAuSl+OhQkYozlprD0c=";
})
# TODO: splatmoji PR is out-of-date
# (fetchpatch' {
# title = "splatmoji: init at 1.2.0";
# prUrl = "https://github.com/NixOS/nixpkgs/pull/211874";
# saneCommit = "75149039b6eaf57d8a92164e90aab20eb5d89196";
# hash = "sha256-abLakAWaRfc8tgu4IwUdR/w8GAuSl+OhQkYozlprD0c=";
# })
# (fetchpatch {
# # stdenv: fix cc for pseudo-crosscompilation

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
owner = "cspeterson";
repo = "splatmoji";
rev = "v${version}";
sha256 = "sha256-fsZ8FhLP3vAalRJWUEi/0fe0DlwAz5zZeRZqAuwgv/U=";
hash = "sha256-fsZ8FhLP3vAalRJWUEi/0fe0DlwAz5zZeRZqAuwgv/U=";
};
nativeBuildInputs = [
@ -33,10 +33,13 @@ stdenv.mkDerivation rec {
'';
buildPhase = ''
runHook preBuild
./build.sh ${version} dir
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R build/usr/* $out
@ -44,6 +47,7 @@ stdenv.mkDerivation rec {
# splatmoji refers to its lib and data by absolute path
sed -i "s:/usr/lib/splatmoji:$out/lib/splatmoji:g" $out/bin/splatmoji
sed -i -r "s:/usr/share/+splatmoji:$out/share/splatmoji:g" $out/lib/splatmoji/functions
runHook postInstall
'';
meta = with lib; {