nixpkgs/nixos/modules/programs/digitalbitbox/default.nix
David Asabina e41ca3b347 digitalbitbox: init at 2.2.2 (#33787)
* digitalbitbox: init at 2.2.2

The commits that lead to this have been squashed from independent
commits see branch @vidbina/add/digitalbitbox-wip that did the
following:
 - 0a3030fa0ec digitalbitbox: init at 2.2.2
 - c18ffa3ffd4 digitalbitbox: moved meta to EOF
 - 0c5f3d6972a digitalbitbox: using preConfigure + configureFlags
 - a85b1dfc3fd digitalbitbox: nativeBuildInputs
 - 90bdd35ef0f digitalbitbox: autoreconfHook
 - 91810eea055 digitalbitbox: default installPhase & makeWrapper
 - 90e43fb7e2a digitalbitbox: doc rm $PWD hack & printf-tee deal
 - fd033b2fe5a digitalbitbox: cleanup, alphabetically sort attrs
 - c5907982db3 digitalbitbox: added hardware module
 - 88e46bc9ae0 digitalbitbox: added program module
 - amend to change name: dbb-app -> digitalbitbox
 - amend to add install instructions based on feedback
 (https://github.com/NixOS/nixpkgs/pull/33787#issuecomment-362813149)
 - amend to add longDescription
 - moved program to its own dir
 - overridable udev rules handling
 - added docs to manual
 - added package attr to program module
 - added package attr to hardware module

* digitalbitbox: use libsForQt5.callPackage
2018-02-27 22:40:22 +00:00

40 lines
893 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.digitalbitbox;
in
{
options.programs.digitalbitbox = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Installs the Digital Bitbox application and enables the complementary hardware module.
'';
};
package = mkOption {
type = types.package;
default = pkgs.digitalbitbox;
defaultText = "pkgs.digitalbitbox";
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
hardware.digitalbitbox = {
enable = true;
package = cfg.package;
};
};
meta = {
doc = ./doc.xml;
maintainers = with stdenv.lib.maintainers; [ vidbina ];
};
}