diff --git a/pkgs/by-name/gt/gtklock-playerctl-module/package.nix b/pkgs/by-name/gt/gtklock-playerctl-module/package.nix new file mode 100644 index 000000000000..847f17305747 --- /dev/null +++ b/pkgs/by-name/gt/gtklock-playerctl-module/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + gtk3, + playerctl, + libsoup_3, + gtklock, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gtklock-playerctl-module"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "jovanlanik"; + repo = "gtklock-playerctl-module"; + rev = "v${finalAttrs.version}"; + hash = "sha256-YlnZxp06Bb8eIgZhCvbiX6jgnNuGoSv4wx0N4AD1V7o="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + gtk3 + playerctl + libsoup_3 + ]; + + passthru.tests.testModule = gtklock.testModule finalAttrs.finalPackage; + + meta = { + description = "Gtklock module adding media player controls to the lockscreen"; + homepage = "https://github.com/jovanlanik/gtklock-playerctl-module"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/gt/gtklock-powerbar-module/package.nix b/pkgs/by-name/gt/gtklock-powerbar-module/package.nix new file mode 100644 index 000000000000..9be823146038 --- /dev/null +++ b/pkgs/by-name/gt/gtklock-powerbar-module/package.nix @@ -0,0 +1,40 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + gtk3, + gtklock, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gtklock-powerbar-module"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "jovanlanik"; + repo = "gtklock-powerbar-module"; + rev = "v${finalAttrs.version}"; + hash = "sha256-Zakdta1i0o7S2AbHydlonnh5OMGVgGjB2H/AiHgQT9A="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ gtk3 ]; + + passthru.tests.testModule = gtklock.testModule finalAttrs.finalPackage; + + meta = { + description = "Gtklock module adding power controls to the lockscreen"; + homepage = "https://github.com/jovanlanik/gtklock-powerbar-module"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/gt/gtklock-userinfo-module/package.nix b/pkgs/by-name/gt/gtklock-userinfo-module/package.nix new file mode 100644 index 000000000000..8bf94d73610e --- /dev/null +++ b/pkgs/by-name/gt/gtklock-userinfo-module/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + gtk3, + glib, + accountsservice, + gtklock, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gtklock-userinfo-module"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "jovanlanik"; + repo = "gtklock-userinfo-module"; + rev = "v${finalAttrs.version}"; + hash = "sha256-d9S0Tj7aII2JQ5/PZmt8HaUIb5caoD4GND0PGvuRMn8="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + gtk3 + glib + accountsservice + ]; + + passthru.tests.testModule = gtklock.testModule finalAttrs.finalPackage; + + meta = { + description = "Gtklock module adding user info to the lockscreen"; + homepage = "https://github.com/jovanlanik/gtklock-userinfo-module"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/gt/gtklock/package.nix b/pkgs/by-name/gt/gtklock/package.nix new file mode 100644 index 000000000000..ff3369c1ebbf --- /dev/null +++ b/pkgs/by-name/gt/gtklock/package.nix @@ -0,0 +1,74 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + scdoc, + pkg-config, + wrapGAppsHook3, + gtk3, + pam, + gtk-session-lock, + runCommand, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gtklock"; + # Must run nixpkgs-review between version changes + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "jovanlanik"; + repo = "gtklock"; + rev = "v${finalAttrs.version}"; + hash = "sha256-e/JRJtQAyIvQhL5hSbY7I/f12Z9g2N0MAHQvX+aXz8Q="; + }; + + nativeBuildInputs = [ + meson + ninja + scdoc + pkg-config + wrapGAppsHook3 + ]; + + buildInputs = [ + gtk3 + pam + gtk-session-lock + ]; + + strictDeps = true; + + passthru.testModule = + module: + runCommand "${module.name}-test.sh" { } '' + MODULE_PATH=$(find ${module}/lib/gtklock -maxdepth 1 -name '*.so') + echo -e "[main]\nmodules=''${MODULE_PATH}" >./config.ini + ${finalAttrs.finalPackage}/bin/gtklock --config ./config.ini >./log 2>&1 || true + if grep incompatible ./log; then + echo "${module.name} is incompatible with current ${finalAttrs.finalPackage.name}!" + exit 1 + else + echo "Successfully tested ${module.name} against ${finalAttrs.finalPackage.name}." + fi + touch $out + ''; + + meta = { + description = "GTK-based lockscreen for Wayland"; + longDescription = '' + Important note: for gtklock to work you need to set "security.pam.services.gtklock = {};" manually. + Otherwise you'll lock youself out of desktop and unable to authenticate. + ''; # Following nixpkgs/pkgs/applications/window-managers/sway/lock.nix + homepage = "https://github.com/jovanlanik/gtklock"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ + dit7ya + aleksana + ]; + platforms = lib.platforms.linux; + mainProgram = "gtklock"; + }; +}) diff --git a/pkgs/tools/wayland/gtklock/default.nix b/pkgs/tools/wayland/gtklock/default.nix deleted file mode 100644 index 79e3870b81a4..000000000000 --- a/pkgs/tools/wayland/gtklock/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, meson -, ninja -, scdoc -, pkg-config -, wrapGAppsHook3 -, gtk3 -, pam -, gtk-session-lock -}: - -stdenv.mkDerivation rec { - pname = "gtklock"; - version = "3.0.0"; - - src = fetchFromGitHub { - owner = "jovanlanik"; - repo = "gtklock"; - rev = "v${version}"; - hash = "sha256-B6pySjiwPBRFb4avE9NHsS1KkWMPW81DAqYro/wtrmQ="; - }; - - nativeBuildInputs = [ - meson - ninja - scdoc - pkg-config - wrapGAppsHook3 - ]; - - buildInputs = [ - gtk3 - pam - gtk-session-lock - ]; - - strictDeps = true; - - installFlags = [ - "DESTDIR=$(out)" - "PREFIX=" - ]; - - meta = with lib; { - description = "GTK-based lockscreen for Wayland"; - longDescription = '' - Important note: for gtklock to work you need to set "security.pam.services.gtklock = {};" manually. - ''; # Following nixpkgs/pkgs/applications/window-managers/sway/lock.nix - homepage = "https://github.com/jovanlanik/gtklock"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ dit7ya aleksana ]; - platforms = platforms.linux; - mainProgram = "gtklock"; - }; -} diff --git a/pkgs/tools/wayland/gtklock/playerctl-module.nix b/pkgs/tools/wayland/gtklock/playerctl-module.nix deleted file mode 100644 index ac3c31ca0a03..000000000000 --- a/pkgs/tools/wayland/gtklock/playerctl-module.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, gtk3 -, playerctl -, libsoup -}: - -stdenv.mkDerivation rec { - pname = "gtklock-playerctl-module"; - version = "3.0.0"; - - src = fetchFromGitHub { - owner = "jovanlanik"; - repo = pname; - rev = "v${version}"; - hash = "sha256-eN4E3+jv8IyRvV8pvfCjCc6pl8y7qSLRlj7tYkX0JrE="; - }; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ gtk3 playerctl libsoup ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - meta = with lib; { - description = "Gtklock module adding media player controls to the lockscreen"; - homepage = "https://github.com/jovanlanik/gtklock-playerctl-module"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ aleksana ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/tools/wayland/gtklock/powerbar-module.nix b/pkgs/tools/wayland/gtklock/powerbar-module.nix deleted file mode 100644 index 5c22d6535795..000000000000 --- a/pkgs/tools/wayland/gtklock/powerbar-module.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, gtk3 -}: - -stdenv.mkDerivation rec { - pname = "gtklock-powerbar-module"; - version = "3.0.0"; - - src = fetchFromGitHub { - owner = "jovanlanik"; - repo = pname; - rev = "v${version}"; - hash = "sha256-uqGWr3/PaXif+JuxqRDlvfeiVG2nbausfe5dZOHcm7o="; - }; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ gtk3 ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - meta = with lib; { - description = "Gtklock module adding power controls to the lockscreen"; - homepage = "https://github.com/jovanlanik/gtklock-powerbar-module"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ aleksana ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/tools/wayland/gtklock/userinfo-module.nix b/pkgs/tools/wayland/gtklock/userinfo-module.nix deleted file mode 100644 index 72e650861cd3..000000000000 --- a/pkgs/tools/wayland/gtklock/userinfo-module.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, gtk3 -, glib -, accountsservice -}: - -stdenv.mkDerivation rec { - pname = "gtklock-userinfo-module"; - version = "3.0.0"; - - src = fetchFromGitHub { - owner = "jovanlanik"; - repo = pname; - rev = "v${version}"; - hash = "sha256-gZ9TGARuWFGyWLROlJQWwiEtbzQC9rlG8NKxUuGh57c="; - }; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ gtk3 glib accountsservice ]; - - makeFlags = [ "PREFIX=$(out)" ]; - - meta = with lib; { - description = "Gtklock module adding user info to the lockscreen"; - homepage = "https://github.com/jovanlanik/gtklock-userinfo-module"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ aleksana ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ebffaa70335..ec4442b22ebe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14376,14 +14376,6 @@ with pkgs; gpxsee = gpxsee-qt5; - gtklock = callPackage ../tools/wayland/gtklock { }; - - gtklock-playerctl-module = callPackage ../tools/wayland/gtklock/playerctl-module.nix { }; - - gtklock-powerbar-module = callPackage ../tools/wayland/gtklock/powerbar-module.nix { }; - - gtklock-userinfo-module = callPackage ../tools/wayland/gtklock/userinfo-module.nix { }; - guvcview = libsForQt5.callPackage ../os-specific/linux/guvcview { }; hachoir = with python3Packages; toPythonApplication hachoir;