nixpkgs/pkgs/applications/misc/gnome-passwordsafe/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

81 lines
1.9 KiB
Nix

{ lib, stdenv
, meson
, ninja
, pkg-config
, gettext
, fetchFromGitLab
, python3
, libhandy_0
, libpwquality
, wrapGAppsHook
, gtk3
, glib
, gdk-pixbuf
, gobject-introspection
, desktop-file-utils
, appstream-glib }:
python3.pkgs.buildPythonApplication rec {
pname = "gnome-passwordsafe";
version = "3.99.2";
format = "other";
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "PasswordSafe";
rev = version;
sha256 = "0pi2l4gwf8paxm858mxrcsk5nr0c0zw5ycax40mghndb6b1qmmhf";
};
nativeBuildInputs = [
meson
ninja
gettext
pkg-config
wrapGAppsHook
desktop-file-utils
appstream-glib
gobject-introspection
];
buildInputs = [
gtk3
glib
gdk-pixbuf
libhandy_0
];
propagatedBuildInputs = with python3.pkgs; [
pygobject3
construct
# pykeepass 3.2.1 changed some exception types, and is not backwards compatible.
# Remove override once the MR is merged upstream.
# https://gitlab.gnome.org/World/PasswordSafe/-/merge_requests/79
(pykeepass.overridePythonAttrs (old: rec {
version = "3.2.0";
src = fetchPypi {
pname = "pykeepass";
inherit version;
sha256 = "1ysjn92bixq8wkwhlbhrjj9z0h80qnlnj7ks5478ndkzdw5gxvm1";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pycryptodome ];
}))
] ++ [
libpwquality # using the python bindings
];
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";
homepage = "https://gitlab.gnome.org/World/PasswordSafe";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ mvnetbiz ];
};
}