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