diff options
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/cde.nix | 55 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/default.nix | 2 | ||||
-rw-r--r-- | pkgs/desktops/cdesktopenv/default.nix | 75 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 133 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/cde.nix b/nixos/modules/services/x11/desktop-managers/cde.nix new file mode 100644 index 0000000000000..c1b6d3bf064ad --- /dev/null +++ b/nixos/modules/services/x11/desktop-managers/cde.nix @@ -0,0 +1,55 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + xcfg = config.services.xserver; + cfg = xcfg.desktopManager.cde; +in { + options.services.xserver.desktopManager.cde = { + enable = mkEnableOption "Common Desktop Environment"; + }; + + config = mkIf (xcfg.enable && cfg.enable) { + services.rpcbind.enable = true; + + services.xinetd.enable = true; + services.xinetd.services = [ + { + name = "cmsd"; + protocol = "udp"; + user = "root"; + server = "${pkgs.cdesktopenv}/opt/dt/bin/rpc.cmsd"; + extraConfig = '' + type = RPC UNLISTED + rpc_number = 100068 + rpc_version = 2-5 + only_from = 127.0.0.1/0 + ''; + } + ]; + + users.groups.mail = {}; + security.wrappers = { + dtmail = { + source = "${pkgs.cdesktopenv}/bin/dtmail"; + group = "mail"; + setgid = true; + }; + }; + + system.activationScripts.setup-cde = '' + mkdir -p /var/dt/{tmp,appconfig/appmanager} + chmod a+w+t /var/dt/{tmp,appconfig/appmanager} + ''; + + services.xserver.desktopManager.session = [ + { name = "CDE"; + start = '' + exec ${pkgs.cdesktopenv}/opt/dt/bin/Xsession + ''; + }]; + }; + + meta.maintainers = [ maintainers.gnidorah ]; +} diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 671a959cdde1f..631726f7b84fb 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -20,7 +20,7 @@ in imports = [ ./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix ./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix - ./mate.nix ./pantheon.nix ./surf-display.nix + ./mate.nix ./pantheon.nix ./surf-display.nix ./cde.nix ]; options = { diff --git a/pkgs/desktops/cdesktopenv/default.nix b/pkgs/desktops/cdesktopenv/default.nix new file mode 100644 index 0000000000000..09d53cdd1c561 --- /dev/null +++ b/pkgs/desktops/cdesktopenv/default.nix @@ -0,0 +1,75 @@ +{ stdenv, fetchgit, xorgproto, libX11, bison, ksh, perl, gnum4 +, libXinerama, libXt, libXext, libtirpc, motif, libXft, xbitmaps +, libjpeg, libXmu, libXdmcp, libXScrnSaver, symlinkJoin, bdftopcf +, ncompress, mkfontdir, tcl, libXaw, gcc, glibcLocales, gawk +, autoPatchelfHook, libredirect, makeWrapper, xset, xrdb, fakeroot }: + +let + x11ProjectRoot = symlinkJoin { + name = "x11ProjectRoot"; + paths = [ + bdftopcf mkfontdir + xset # fonts + xrdb # session load + ]; + }; +in stdenv.mkDerivation rec { + version = "2019-11-30"; + name = "cde-${version}"; + + src = fetchgit { + url = "https://git.code.sf.net/p/cdesktopenv/code"; + rev = "5cebd7c4da1afea353a3baef250e31a4cf867bc5"; + sha256 = "06wvnb3n8hn98kxvmrf6v3lyqp8bxpzl8wrixlw9jinmsivfs4b9"; + }; + setSourceRoot = ''export sourceRoot="$(echo */cde)"''; + + buildInputs = [ + libX11 libXinerama libXt libXext libtirpc motif libXft xbitmaps + libjpeg libXmu libXdmcp libXScrnSaver tcl libXaw ksh + ]; + nativeBuildInputs = [ + bison ncompress gawk autoPatchelfHook makeWrapper fakeroot + ]; + + makeFlags = [ + "World" + "BOOTSTRAPCFLAGS=-I${xorgproto}/include/X11" + "IMAKECPP=cpp" + "LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive" + ]; + + preBuild = '' + while IFS= read -r -d ''$'\0' i; do + substituteInPlace "$i" --replace /usr/dt $out/opt/dt + done < <(find "." -type f -exec grep -Iq /usr/dt {} \; -and -print0) + + cat >> config/cf/site.def << EOF +#define MakeFlagsToShellFlags(makeflags,shellcmd) set -e +#define KornShell ${ksh}/bin/ksh +#define PerlCmd ${perl}/bin/perl +#define M4Cmd ${gnum4}/bin/m4 +#define X11ProjectRoot ${x11ProjectRoot} +#define CppCmd ${gcc}/bin/cpp +TIRPCINC = -I${libtirpc.dev}/include/tirpc +EOF + + patchShebangs . + unset AR + ''; + + installPhase = '' + fakeroot admin/IntegTools/dbTools/installCDE -s . -DontRunScripts + + mkdir -p $out/bin + mv $out/opt/dt/bin/dtmail $out/bin + ''; + + meta = with stdenv.lib; { + description = "Common Desktop Environment"; + homepage = https://sourceforge.net/projects/cdesktopenv/; + license = licenses.lgpl2; + maintainers = [ maintainers.gnidorah ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 31bfa97e1f310..6e7c62aeb46a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23339,6 +23339,8 @@ in ### DESKTOP ENVIRONMENTS + cdesktopenv = callPackage ../desktops/cdesktopenv { }; + cinnamon = recurseIntoAttrs (callPackage ../desktops/cinnamon { }); deepin = recurseIntoAttrs (import ../desktops/deepin { |