mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 12:02:47 +00:00
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib, mkDerivation, fetchFromGitHub
|
|
, libusb1
|
|
, pkg-config
|
|
, qmake
|
|
, qtbase
|
|
, qttools
|
|
, qtwebsockets
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "moolticute";
|
|
version = "0.43.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mooltipass";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1gx1hbxiilggwfw0jspyk2cw92r6qs9a8yqa8x1d2ndf493mjx9y";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|