From 61b6ed869a9f8acb6833c4924e6e638e482786bd Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 19 Jan 2022 14:55:04 +0100 Subject: [PATCH] gnome-passwordsafe: rename to gnome-secrets, 5.0->6.1 --- .../from_md/release-notes/rl-2205.section.xml | 7 ++++ .../manual/release-notes/rl-2205.section.md | 2 ++ .../default.nix | 32 +++++++++++++------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 33 insertions(+), 11 deletions(-) rename pkgs/applications/misc/{gnome-passwordsafe => gnome-secrets}/default.nix (69%) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index e99f786b33ce..49f611d922b8 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -271,6 +271,13 @@ writers.writePyPy2 needs to be used. + + + The gnome-passwordsafe package updated to + version + 6.x and renamed to gnome-secrets. + + If you previously used diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index a8b717c6f846..1b8697c68510 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -90,6 +90,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The `writers.writePython2` and corresponding `writers.writePython2Bin` convenience functions to create executable Python 2 scripts in the store were removed in preparation of removal of the Python 2 interpreter. Scripts have to be converted to Python 3 for use with `writers.writePython3` or `writers.writePyPy2` needs to be used. +- The `gnome-passwordsafe` package updated to [version 6.x](https://gitlab.gnome.org/World/secrets/-/tags/6.0) and renamed to `gnome-secrets`. + - If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`. - The backward compatibility in `services.wordpress` to configure sites with diff --git a/pkgs/applications/misc/gnome-passwordsafe/default.nix b/pkgs/applications/misc/gnome-secrets/default.nix similarity index 69% rename from pkgs/applications/misc/gnome-passwordsafe/default.nix rename to pkgs/applications/misc/gnome-secrets/default.nix index e7a413e63b46..00e55b9e7a8b 100644 --- a/pkgs/applications/misc/gnome-passwordsafe/default.nix +++ b/pkgs/applications/misc/gnome-secrets/default.nix @@ -5,19 +5,19 @@ , gettext , fetchFromGitLab , python3Packages -, libhandy , libpwquality -, wrapGAppsHook -, gtk3 +, wrapGAppsHook4 +, gtk4 , glib , gdk-pixbuf , gobject-introspection , desktop-file-utils -, appstream-glib }: +, appstream-glib +, libadwaita }: python3Packages.buildPythonApplication rec { - pname = "gnome-passwordsafe"; - version = "5.1"; + pname = "gnome-secrets"; + version = "6.1"; format = "other"; strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943 @@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec { owner = "World"; repo = "secrets"; rev = version; - sha256 = "sha256-RgpkLoqhwCdaPZxC1Qe0MpLtYLevNCOxbvwEEI0cpE0="; + sha256 = "sha256-TBGNiiR0GW8s/Efi4/Qqvwd87Ir0gCLGPfBmmqqSwQ8="; }; nativeBuildInputs = [ @@ -34,27 +34,39 @@ python3Packages.buildPythonApplication rec { ninja gettext pkg-config - wrapGAppsHook + wrapGAppsHook4 desktop-file-utils appstream-glib gobject-introspection ]; buildInputs = [ - gtk3 + gtk4 glib gdk-pixbuf - libhandy + libadwaita ]; propagatedBuildInputs = with python3Packages; [ pygobject3 construct pykeepass + pyotp ] ++ [ libpwquality # using the python bindings ]; + postPatch = '' + substituteInPlace meson_post_install.py --replace "gtk-update-icon-cache" "gtk4-update-icon-cache"; + ''; + + # Prevent double wrapping, let the Python wrapper use the args in preFixup. + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + meta = with lib; { broken = stdenv.hostPlatform.isStatic; # libpwquality doesn't provide bindings when static description = "Password manager for GNOME which makes use of the KeePass v.4 format"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 42b4b8f59b49..ba00854329a7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -331,6 +331,7 @@ mapAliases ({ gmailieer = lieer; # added 2020-04-19 gmvault = throw "gmvault has been removed because it is unmaintained, mostly broken, and insecure"; # added 2021-03-08 gnome-mpv = celluloid; # added 2019-08-22 + gnome-passwordsafe = gnome-secrets; # added 2022-01-30 gnome15 = throw "gnome15 has been removed from nixpkgs, as it's unmaintained and depends on deprecated libraries."; # added 2019-12-10 gmic_krita_qt = gmic-qt-krita; # added 2019-09-07 gnome-themes-standard = gnome-themes-extra; # added 2018-03-14 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 80896900dd13..bab536dd4f64 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5914,7 +5914,7 @@ with pkgs; gnome-keysign = callPackage ../tools/security/gnome-keysign { }; - gnome-passwordsafe = callPackage ../applications/misc/gnome-passwordsafe { }; + gnome-secrets = callPackage ../applications/misc/gnome-secrets { }; gnome-podcasts = callPackage ../applications/audio/gnome-podcasts { };