2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapGAppsHook
|
|
|
|
, cinnamon
|
|
|
|
, glib
|
|
|
|
, gspell
|
|
|
|
, gtk3
|
|
|
|
, gobject-introspection
|
2022-09-11 15:47:08 +00:00
|
|
|
, gitUpdater
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sticky";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.13";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-oirTDIbvG9/iAkYrquX+ciujAnLUmubkBVvTyaiz2g8=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e "s|/usr/share|$out/share|" usr/lib/sticky/*.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gobject-introspection
|
2022-08-12 12:06:08 +00:00
|
|
|
cinnamon.xapp
|
2022-06-16 17:23:12 +00:00
|
|
|
gspell
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pygobject3
|
|
|
|
xapp
|
|
|
|
];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
glib-compile-schemas usr/share/glib-2.0/schemas
|
|
|
|
'';
|
|
|
|
|
|
|
|
# hook for gobject-introspection doesn't like strictDeps
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/56943
|
|
|
|
strictDeps = false;
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv usr/lib $out
|
|
|
|
mv usr/share $out
|
|
|
|
patchShebangs $out/lib/sticky
|
|
|
|
mv $out/lib/sticky/sticky.py $out/bin/sticky
|
|
|
|
sed -i -e "1aimport sys;sys.path.append('$out/lib/sticky')" $out/bin/sticky
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Arguments to be passed to `makeWrapper`, only used by buildPython*
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
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";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|