2020-04-24 23:36:52 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, qtwebsockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "moolticute";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.02.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mooltipass";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-URGAhd7u1DrGReQAwsX9LMj7Jq1GsILzP8fVFnA74O4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "udev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config qmake qttools ];
|
|
|
|
buildInputs = [ libusb1 qtbase qtwebsockets ];
|
|
|
|
|
|
|
|
preConfigure = "mkdir -p build && cd build";
|
|
|
|
qmakeFlags = [ "../Moolticute.pro" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $udev/lib/udev/rules.d
|
2022-02-20 05:27:41 +00:00
|
|
|
sed -n '/^UDEV_RULE=="\$(cat <<-EOF$/,/^EOF$/p' ../data/moolticute.sh |
|
2020-04-24 23:36:52 +00:00
|
|
|
sed '1d;$d' > $udev/lib/udev/rules.d/50-mooltipass.rules
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "GUI app and daemon to work with Mooltipass device via USB";
|
|
|
|
longDescription = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
To install udev rules, add `services.udev.packages = [ pkgs.moolticute.udev ]`
|
2020-04-24 23:36:52 +00:00
|
|
|
into `nixos/configuration.nix`.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/mooltipass/moolticute";
|
|
|
|
license = licenses.gpl3Plus;
|
2023-02-09 11:40:11 +00:00
|
|
|
maintainers = with maintainers; [ kirikaza hughobrien ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|