From 446c144b1a447c470e97db79225695806e3497b8 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 15 Jan 2014 00:58:46 -0500 Subject: [PATCH] Add kmscon, a kms-based replacement for kernel VTs Note that currently this depends on the default nixpkgs mesa and pango. It may be possible to build more limited versions that don't e.g. depend on the full X stack without limiting kmscon (which of course doesn't use X). Depends on libtsm, added in the same commit. Signed-off-by: Shea Levy --- pkgs/development/libraries/libtsm/default.nix | 21 +++++++++++++++ pkgs/os-specific/linux/kmscon/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 51 insertions(+) create mode 100644 pkgs/development/libraries/libtsm/default.nix create mode 100644 pkgs/os-specific/linux/kmscon/default.nix diff --git a/pkgs/development/libraries/libtsm/default.nix b/pkgs/development/libraries/libtsm/default.nix new file mode 100644 index 000000000000..66e1698b11d0 --- /dev/null +++ b/pkgs/development/libraries/libtsm/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, libxkbcommon, pkgconfig }: + +stdenv.mkDerivation rec { + name = "libtsm-3"; + + src = fetchurl { + url = "http://freedesktop.org/software/kmscon/releases/${name}.tar.xz"; + sha256 = "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i"; + }; + + buildInputs = [ libxkbcommon pkgconfig ]; + + configureFlags = [ "--disable-debug" ]; + + meta = { + description = "Terminal-emulator State Machine"; + homepage = "http://www.freedesktop.org/wiki/Software/kmscon/libtsm/"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.shlevy ]; + }; +} diff --git a/pkgs/os-specific/linux/kmscon/default.nix b/pkgs/os-specific/linux/kmscon/default.nix new file mode 100644 index 000000000000..70efb49e228b --- /dev/null +++ b/pkgs/os-specific/linux/kmscon/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, libtsm, systemd, libxkbcommon, libdrm, mesa, pango, pixman, pkgconfig }: + +stdenv.mkDerivation rec { + name = "kmscon-8"; + + src = fetchurl { + url = "http://www.freedesktop.org/software/kmscon/releases/${name}.tar.xz"; + sha256 = "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a"; + }; + + buildInputs = [ libtsm systemd libxkbcommon libdrm mesa pango pixman pkgconfig ]; + + configureFlags = [ + "--enable-multi-seat" + "--disable-debug" + "--enable-optimizations" + "--with-renderers=bbulk,gltex,pixman" + ]; + + meta = { + description = "KMS/DRM based System Console"; + homepage = "http://www.freedesktop.org/wiki/Software/kmscon/"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.shlevy ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b612ff96071..c7204e2a0b7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5103,6 +5103,8 @@ let libtoxcore = callPackage ../development/libraries/libtoxcore { }; + libtsm = callPackage ../development/libraries/libtsm { }; + libtunepimp = callPackage ../development/libraries/libtunepimp { }; libtxc_dxtn = callPackage ../development/libraries/libtxc_dxtn { }; @@ -6668,6 +6670,8 @@ let kbd = callPackage ../os-specific/linux/kbd { }; + kmscon = callPackage ../os-specific/linux/kmscon { }; + latencytop = callPackage ../os-specific/linux/latencytop { }; ldm = callPackage ../os-specific/linux/ldm { };