1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/pkgs/applications/misc/qMasterPassword/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

49 lines
1.9 KiB
Nix

{ lib, stdenv, mkDerivation, fetchFromGitHub, qtbase, qmake, libX11, libXtst, openssl, libscrypt }:
mkDerivation rec {
name = "qMasterPassword";
version = "1.2.2";
src = fetchFromGitHub {
owner = "bkueng";
repo = name;
rev = "v${version}";
sha256 = "0l0jarvfdc69rcjl2wa0ixq8gp3fmjsy9n84m38sxf3n9j2bh13c";
};
buildInputs = [ qtbase libX11 libXtst openssl libscrypt ];
nativeBuildInputs = [ qmake ];
# Upstream install is mostly defunct. It hardcodes target.path and doesn't
# install anything but the binary.
installPhase = if stdenv.isDarwin then ''
mkdir -p "$out"/{Applications,bin}
mv qMasterPassword.app "$out"/Applications/
ln -s ../Applications/qMasterPassword.app/Contents/MacOS/qMasterPassword "$out"/bin/qMasterPassword
'' else ''
mkdir -p $out/bin
mkdir -p $out/share/{applications,doc/qMasterPassword,icons/qmasterpassword,icons/hicolor/512x512/apps}
mv qMasterPassword $out/bin
mv data/qMasterPassword.desktop $out/share/applications
mv LICENSE README.md $out/share/doc/qMasterPassword
mv data/icons/app_icon.png $out/share/icons/hicolor/512x512/apps/qmasterpassword.png
mv data/icons/* $out/share/icons/qmasterpassword
'';
meta = with lib; {
description = "Stateless Master Password Manager";
longDescription = ''
Access all your passwords using only a single master password. But in
contrast to other managers it does not store any passwords: Unique
passwords are generated from the master password and a site name. This
means you automatically get different passwords for each account and
there is no password file that can be lost or get stolen. There is also
no need to trust any online password service.
'';
homepage = "https://github.com/bkueng/qMasterPassword";
license = licenses.gpl3;
maintainers = [ maintainers.tadeokondrak ];
platforms = platforms.all;
};
}