2024-01-13 08:15:51 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
2022-06-16 17:23:12 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, cinnamon
|
|
|
|
, glib
|
|
|
|
, gspell
|
|
|
|
, gtk3
|
2022-09-11 15:47:08 +00:00
|
|
|
, gitUpdater
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "sticky";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.19";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-nvnft62vZ9ivijYnQGULW7ff2aAVJiIx9xq09My2NxE=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
sed -i -e "s|/usr/bin|$out/bin|" data/org.x.sticky.service
|
|
|
|
sed -i -e "s|/usr/lib|$out/lib|" usr/bin/sticky
|
2022-06-16 17:23:12 +00:00
|
|
|
sed -i -e "s|/usr/share|$out/share|" usr/lib/sticky/*.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
2024-01-13 08:15:51 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
python3.pkgs.wrapPython
|
2022-06-16 17:23:12 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
cinnamon.xapp
|
2024-01-13 08:15:51 +00:00
|
|
|
glib
|
2022-06-16 17:23:12 +00:00
|
|
|
gspell
|
2024-01-13 08:15:51 +00:00
|
|
|
gtk3
|
|
|
|
python3 # for patchShebangs
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonPath = with python3.pkgs; [
|
2022-06-16 17:23:12 +00:00
|
|
|
pygobject3
|
|
|
|
xapp
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
# https://github.com/linuxmint/sticky/pull/118
|
|
|
|
cp -r ../etc $out
|
|
|
|
cp -r ../usr/* $out
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
|
|
|
|
chmod +x $out/bin/sticky
|
|
|
|
wrapProgram $out/bin/sticky \
|
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH" \
|
|
|
|
''${gappsWrapperArgs[@]}
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
ignoredVersions = ''master.*'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A sticky notes app for the linux desktop";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sticky";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/linuxmint/sticky";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ linsui bobby285271 ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|