From 3e78dcea49a1ec6774cc16005ab30f1c5ba62190 Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 20 Jun 2024 00:24:56 +0800 Subject: emote: move to pkgs/by-name --- pkgs/by-name/em/emote/package.nix | 62 +++++++++++++++++++++++++++++++ pkgs/tools/inputmethods/emote/default.nix | 62 ------------------------------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 62 insertions(+), 64 deletions(-) create mode 100644 pkgs/by-name/em/emote/package.nix delete mode 100644 pkgs/tools/inputmethods/emote/default.nix (limited to 'pkgs') diff --git a/pkgs/by-name/em/emote/package.nix b/pkgs/by-name/em/emote/package.nix new file mode 100644 index 0000000000000..10e66f1d33b3c --- /dev/null +++ b/pkgs/by-name/em/emote/package.nix @@ -0,0 +1,62 @@ +{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool }: + +python3Packages.buildPythonApplication rec { + pname = "emote"; + version = "4.0.1"; + + src = fetchFromGitHub { + owner = "tom-james-watson"; + repo = "Emote"; + rev = "v${version}"; + sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A="; + }; + + postPatch = '' + sed -i setup.py -e '/==.*/d' + substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'" + substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'" + substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg" + ''; + + nativeBuildInputs = [ + wrapGAppsHook3 + gobject-introspection + ]; + + buildInputs = [ + # used by gobject-introspection's setup-hook and only detected at runtime + keybinder3 + ]; + + propagatedBuildInputs = with python3Packages; [ + dbus-python.out # don't propagate dev output + manimpango + pygobject3.out # not listed in setup.py, don't propagate dev output + setproctitle + ]; + + postInstall = '' + install -D snap/gui/emote.desktop $out/share/applications/emote.desktop + install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg + install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css} + ''; + + dontWrapGApps = true; + preFixup = '' + makeWrapperArgs+=( + "''${gappsWrapperArgs[@]}" + --prefix PATH : ${lib.makeBinPath [ xdotool ]} + ) + ''; + + doCheck = false; + + meta = with lib; { + description = "Modern emoji picker for Linux"; + mainProgram = "emote"; + homepage = "https://github.com/tom-james-watson/emote"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ emilytrau SuperSandro2000 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/inputmethods/emote/default.nix b/pkgs/tools/inputmethods/emote/default.nix deleted file mode 100644 index 10e66f1d33b3c..0000000000000 --- a/pkgs/tools/inputmethods/emote/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool }: - -python3Packages.buildPythonApplication rec { - pname = "emote"; - version = "4.0.1"; - - src = fetchFromGitHub { - owner = "tom-james-watson"; - repo = "Emote"; - rev = "v${version}"; - sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A="; - }; - - postPatch = '' - sed -i setup.py -e '/==.*/d' - substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'" - substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'" - substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg" - ''; - - nativeBuildInputs = [ - wrapGAppsHook3 - gobject-introspection - ]; - - buildInputs = [ - # used by gobject-introspection's setup-hook and only detected at runtime - keybinder3 - ]; - - propagatedBuildInputs = with python3Packages; [ - dbus-python.out # don't propagate dev output - manimpango - pygobject3.out # not listed in setup.py, don't propagate dev output - setproctitle - ]; - - postInstall = '' - install -D snap/gui/emote.desktop $out/share/applications/emote.desktop - install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg - install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css} - ''; - - dontWrapGApps = true; - preFixup = '' - makeWrapperArgs+=( - "''${gappsWrapperArgs[@]}" - --prefix PATH : ${lib.makeBinPath [ xdotool ]} - ) - ''; - - doCheck = false; - - meta = with lib; { - description = "Modern emoji picker for Linux"; - mainProgram = "emote"; - homepage = "https://github.com/tom-james-watson/emote"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ emilytrau SuperSandro2000 ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e6d8abd82538..a7c36a4974f49 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7488,8 +7488,6 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; - emote = callPackage ../tools/inputmethods/emote { }; - engauge-digitizer = libsForQt5.callPackage ../applications/science/math/engauge-digitizer { }; epub2txt2 = callPackage ../tools/text/epub2txt2 { }; -- cgit 1.4.1 From 1b5d2b080174b3a92e8f894a62c6cde5463afe6a Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 20 Jun 2024 00:28:56 +0800 Subject: emote: format with nixfmt-rfc-style --- pkgs/by-name/em/emote/package.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/by-name/em/emote/package.nix b/pkgs/by-name/em/emote/package.nix index 10e66f1d33b3c..0b9db63b43126 100644 --- a/pkgs/by-name/em/emote/package.nix +++ b/pkgs/by-name/em/emote/package.nix @@ -1,4 +1,12 @@ -{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool }: +{ + lib, + fetchFromGitHub, + python3Packages, + wrapGAppsHook3, + gobject-introspection, + keybinder3, + xdotool, +}: python3Packages.buildPythonApplication rec { pname = "emote"; @@ -56,7 +64,10 @@ python3Packages.buildPythonApplication rec { mainProgram = "emote"; homepage = "https://github.com/tom-james-watson/emote"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ emilytrau SuperSandro2000 ]; + maintainers = with maintainers; [ + emilytrau + SuperSandro2000 + ]; platforms = platforms.linux; }; } -- cgit 1.4.1 From 0e832817a02a7c0d9ba7bbb6ec576853bb828bcd Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 20 Jun 2024 01:01:14 +0800 Subject: emote: 4.0.1 -> 4.1.0 --- pkgs/by-name/em/emote/package.nix | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'pkgs') diff --git a/pkgs/by-name/em/emote/package.nix b/pkgs/by-name/em/emote/package.nix index 0b9db63b43126..1596ba256dc82 100644 --- a/pkgs/by-name/em/emote/package.nix +++ b/pkgs/by-name/em/emote/package.nix @@ -2,31 +2,40 @@ lib, fetchFromGitHub, python3Packages, + meson, + ninja, + pkg-config, wrapGAppsHook3, gobject-introspection, keybinder3, xdotool, + wl-clipboard, }: python3Packages.buildPythonApplication rec { pname = "emote"; - version = "4.0.1"; + version = "4.1.0"; + pyproject = false; # Built with meson src = fetchFromGitHub { owner = "tom-james-watson"; repo = "Emote"; rev = "v${version}"; - sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A="; + hash = "sha256-c5EY1Cc3oD8EG1oTChbl10jJlNeAETQbAFGoA9Lw5PY="; }; postPatch = '' - sed -i setup.py -e '/==.*/d' - substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'" - substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'" - substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg" + substituteInPlace emote/picker.py \ + --replace-fail 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'" + substituteInPlace emote/config.py \ + --replace-fail 'is_flatpak = os.environ.get("FLATPAK") is not None' 'is_flatpak = False' \ + --replace-fail 'os.environ.get("SNAP")' "'$out/share/emote'" ''; nativeBuildInputs = [ + meson + ninja + pkg-config wrapGAppsHook3 gobject-introspection ]; @@ -36,29 +45,31 @@ python3Packages.buildPythonApplication rec { keybinder3 ]; - propagatedBuildInputs = with python3Packages; [ + dependencies = with python3Packages; [ dbus-python.out # don't propagate dev output manimpango - pygobject3.out # not listed in setup.py, don't propagate dev output + pygobject3.out # don't propagate dev output setproctitle ]; postInstall = '' - install -D snap/gui/emote.desktop $out/share/applications/emote.desktop - install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg - install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css} + rm $out/share/emote/emote/{emote.in,meson.build} + rm $out/share/emote/static/{meson.build,com.tomjwatson.Emote.desktop,prepare-launch} ''; dontWrapGApps = true; preFixup = '' makeWrapperArgs+=( "''${gappsWrapperArgs[@]}" - --prefix PATH : ${lib.makeBinPath [ xdotool ]} + --prefix PATH : ${ + lib.makeBinPath [ + xdotool + wl-clipboard + ] + } ) ''; - doCheck = false; - meta = with lib; { description = "Modern emoji picker for Linux"; mainProgram = "emote"; -- cgit 1.4.1 From aed8340530b2fd5749275a88d6f6d8bd2e79e1c3 Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 20 Jun 2024 01:01:31 +0800 Subject: emote: add aleksana as maintainer --- pkgs/by-name/em/emote/package.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs') diff --git a/pkgs/by-name/em/emote/package.nix b/pkgs/by-name/em/emote/package.nix index 1596ba256dc82..1854bc1b1bcc3 100644 --- a/pkgs/by-name/em/emote/package.nix +++ b/pkgs/by-name/em/emote/package.nix @@ -78,6 +78,7 @@ python3Packages.buildPythonApplication rec { maintainers = with maintainers; [ emilytrau SuperSandro2000 + aleksana ]; platforms = platforms.linux; }; -- cgit 1.4.1