2020-02-16 10:23:57 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, qtwebsockets
|
2019-08-20 03:01:29 +01:00
|
|
|
}:
|
|
|
|
|
2020-02-16 10:23:57 +00:00
|
|
|
mkDerivation rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "moolticute";
|
2020-11-11 16:30:14 +00:00
|
|
|
version = "0.44.17";
|
2019-08-20 03:01:29 +01:00
|
|
|
|
2020-02-16 10:23:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mooltipass";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-11 16:30:14 +00:00
|
|
|
sha256 = "1bqp99n8cqr7kjiffbs39v0dd280f50hid5py3c4zgc7aqj9k0bx";
|
2019-08-20 03:01:29 +01:00
|
|
|
};
|
|
|
|
|
2020-02-16 10:23:57 +00:00
|
|
|
outputs = [ "out" "udev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config qmake qttools ];
|
|
|
|
buildInputs = [ libusb1 qtbase qtwebsockets ];
|
|
|
|
|
2019-08-20 03:01:29 +01:00
|
|
|
preConfigure = "mkdir -p build && cd build";
|
|
|
|
qmakeFlags = [ "../Moolticute.pro" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $udev/lib/udev/rules.d
|
|
|
|
sed -n '/^ \+cat > "$tmpfile" <<- EOF$/,/^EOF$/p' ../data/moolticute.sh |
|
|
|
|
sed '1d;$d' > $udev/lib/udev/rules.d/50-mooltipass.rules
|
|
|
|
'';
|
|
|
|
|
2020-02-16 10:23:57 +00:00
|
|
|
meta = with lib; {
|
2019-08-20 03:01:29 +01:00
|
|
|
description = "GUI app and daemon to work with Mooltipass device via USB";
|
|
|
|
longDescription = ''
|
|
|
|
To install udev rules, add `services.udev.packages == [ moolticute.udev ]`
|
|
|
|
into `nixos/configuration.nix`.
|
|
|
|
'';
|
2020-02-16 10:23:57 +00:00
|
|
|
homepage = "https://github.com/mooltipass/moolticute";
|
2019-08-20 03:01:29 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.kirikaza ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|