Merge pull request #141834 from bobby285271/notejot

notejot: 3.1.5 -> 3.2.0
This commit is contained in:
davidak 2021-10-16 12:56:54 +02:00 committed by GitHub
commit e8e8d95751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 14 deletions

View File

@ -2,47 +2,51 @@
, stdenv
, fetchFromGitHub
, gtk4
, gtksourceview
, hicolor-icon-theme
, json-glib
, libadwaita
, libgee
, meson
, ninja
, nix-update-script
, pantheon
, pkg-config
, python3
, vala
, wrapGAppsHook
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "notejot";
version = "3.1.5";
version = "3.2.0";
src = fetchFromGitHub {
owner = "lainsce";
repo = pname;
rev = version;
hash = "sha256-wsHQvN+sqAMs1QldiRoc9JlF4d54JFqNkqC+lyuHC7M=";
hash = "sha256-WyW1tGhO3+OykNa8BRavi93cBMOSBJw0M+0bwQHJOjU=";
};
patches = [
# build: use gtk4-update-icon-cache
# https://github.com/lainsce/notejot/pull/307
./use-gtk4-update-icon-cache.patch
];
nativeBuildInputs = [
meson
ninja
vala
pkg-config
python3
wrapGAppsHook
vala
wrapGAppsHook4
];
buildInputs = [
gtk4
gtksourceview
hicolor-icon-theme
json-glib
libadwaita
libgee
pantheon.elementary-icon-theme
pantheon.granite
];
postPatch = ''
@ -50,6 +54,10 @@ stdenv.mkDerivation rec {
patchShebangs build-aux/post_install.py
'';
passthru.updateScript = nix-update-script {
attrPath = pname;
};
meta = with lib; {
homepage = "https://github.com/lainsce/notejot";
description = "Stupidly-simple sticky notes applet";
@ -57,8 +65,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ AndersonTorres ] ++ teams.pantheon.members;
platforms = platforms.linux;
};
passthru.updateScript = nix-update-script {
attrPath = pname;
};
}

View File

@ -0,0 +1,20 @@
diff --git a/build-aux/post_install.py b/build-aux/post_install.py
index 1278304..fface6d 100644
--- a/build-aux/post_install.py
+++ b/build-aux/post_install.py
@@ -2,11 +2,13 @@
import os
import subprocess
-schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas…')
subprocess.call(['glib-compile-schemas', schemadir], shell=False)
print('Rebuilding desktop icons cache...')
- subprocess.call(['gtk-update-icon-cache', '/usr/share/icons/hicolor/'], shell=False)
+ subprocess.call(['gtk4-update-icon-cache', '-qtf', icondir], shell=False)