mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
libusb1,
|
|
pkg-config,
|
|
libsForQt5,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "moolticute";
|
|
version = "1.03.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mooltipass";
|
|
repo = "moolticute";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-S2Pnueo3opP1k6XBBHGAyRJpkNuI1Hotz7ypXa/96eQ=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"udev"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
libsForQt5.qmake
|
|
libsForQt5.qttools
|
|
libsForQt5.wrapQtAppsHook
|
|
];
|
|
buildInputs = [
|
|
libusb1
|
|
libsForQt5.qtbase
|
|
libsForQt5.qtwebsockets
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
|
|
preConfigure = "mkdir -p build && cd build";
|
|
qmakeFlags = [ "../Moolticute.pro" ];
|
|
|
|
preInstall = ''
|
|
mkdir -p $udev/lib/udev/rules.d
|
|
sed -n '/^UDEV_RULE=="\$(cat <<-EOF$/,/^EOF$/p' ../data/moolticute.sh |
|
|
sed '1d;$d' > $udev/lib/udev/rules.d/50-mooltipass.rules
|
|
'';
|
|
|
|
meta = {
|
|
description = "GUI app and daemon to work with Mooltipass device via USB";
|
|
longDescription = ''
|
|
To install udev rules, add `services.udev.packages = [ pkgs.moolticute.udev ]`
|
|
into `nixos/configuration.nix`.
|
|
'';
|
|
homepage = "https://github.com/mooltipass/moolticute";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ hughobrien ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|