2020-04-24 23:36:52 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, qtwebsockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "moolticute";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "0.53.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mooltipass";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-1hVvpfrfL/+DIeiPW5iVBEnoc8dy8vVWim4JjhsBlzM=";
|
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
|
|
|
|
sed -n '/^ \+cat > "$tmpfile" <<- EOF$/,/^EOF$/p' ../data/moolticute.sh |
|
|
|
|
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 = ''
|
|
|
|
To install udev rules, add `services.udev.packages == [ moolticute.udev ]`
|
|
|
|
into `nixos/configuration.nix`.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/mooltipass/moolticute";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.kirikaza ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|