git.iko.soy/typeable/nixpkgs
on master help sign in
Added BRLTTY package
commit9a535b90238938e38bdb0498e9f2558ace782a4f authorBram Duvigneau <bram@bramd.nl> dateWed 29 Apr 2015, 23:02 (12 years ago) parent06cf9a9
4 files changed+79
nixos/modules/module-list.nix+1 nixos/modules/services/hardware/brltty.nix+42 pkgs/tools/misc/brltty/default.nix+33 pkgs/top-level/all-packages.nix+3
nixos/modules/module-list.nix+1
@@ -152,6 +152,7 @@
152152 ./services/hardware/actkbd.nix
153153 ./services/hardware/amd-hybrid-graphics.nix
154154 ./services/hardware/bluetooth.nix
155+ ./services/hardware/brltty.nix
155156 ./services/hardware/freefall.nix
156157 ./services/hardware/nvidia-optimus.nix
157158 ./services/hardware/pcscd.nix
nixos/modules/services/hardware/brltty.nixnew file+42
@@ -0,0 +1,42 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.brltty;
7+
8+ stateDir = "/run/brltty";
9+
10+ pidFile = "${stateDir}/brltty.pid";
11+
12+in {
13+
14+ options = {
15+
16+ services.brltty.enable = mkOption {
17+ type = types.bool;
18+ default = false;
19+ description = "Whether to enable the BRLTTY daemon.";
20+ };
21+
22+ };
23+
24+ config = mkIf cfg.enable {
25+
26+ systemd.services.brltty = {
27+ description = "Braille console driver";
28+ preStart = ''
29+ mkdir -p ${stateDir}
30+ '';
31+ serviceConfig = {
32+ ExecStart = "${pkgs.brltty}/bin/brltty --pid-file=${pidFile}";
33+ Type = "forking";
34+ PIDFile = pidFile;
35+ };
36+ before = [ "sysinit.target" ];
37+ wantedBy = [ "sysinit.target" ];
38+ };
39+
40+ };
41+
42+}
pkgs/tools/misc/brltty/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, fetchurl, pkgconfig, alsaSupport, alsaLib ? null, bluez }:
2+
3+assert alsaSupport -> alsaLib != null;
4+
5+stdenv.mkDerivation rec {
6+ name = "brltty-5.2";
7+
8+ src = fetchurl {
9+ url = "http://brltty.com/archive/${name}.tar.gz";
10+ sha256 = "1zaab5pxkqrv081n23p3am445d30gk0km4azqdirvcpw9z15q0cz";
11+ };
12+
13+ buildInputs = [ pkgconfig alsaLib bluez ]
14+ ++ stdenv.lib.optional alsaSupport alsaLib;
15+
16+ meta = {
17+ description = "Access software for a blind person using a braille display";
18+ longDescription = ''
19+ BRLTTY is a background process (daemon) which provides access to the Linux/Unix
20+ console (when in text mode) for a blind person using a refreshable braille display.
21+ It drives the braille display, and provides complete screen review functionality.
22+ Some speech capability has also been incorporated.
23+ '';
24+ homepage = http://www.brltty.com/;
25+ license = stdenv.lib.licenses.gpl2;
26+ maintainers = [ stdenv.lib.maintainers.bramd ];
27+ platforms = stdenv.lib.platforms.all;
28+ };
29+
30+ patchPhase = ''
31+ substituteInPlace configure --replace /sbin/ldconfig ldconfig
32+ '';
33+}
pkgs/top-level/all-packages.nix+3
@@ -715,6 +715,9 @@ let
715715
716716 brasero = callPackage ../tools/cd-dvd/brasero { };
717717
718+ brltty = callPackage ../tools/misc/brltty {
719+ alsaSupport = (!stdenv.isDarwin);
720+ };
718721 bro = callPackage ../applications/networking/ids/bro { };
719722
720723 bsod = callPackage ../misc/emulators/bsod { };