maxx: init at 1.0.0

This commit is contained in:
gnidorah 2017-07-04 13:42:53 +03:00
parent 87cfea92f8
commit 7f13a3f5b8
4 changed files with 114 additions and 1 deletions

View File

@ -19,7 +19,7 @@ in
# E.g., if Plasma 5 is enabled, it supersedes xterm.
imports = [
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
];
options = {

View File

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
with lib;
let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.maxx;
deps = [ pkgs.gcc ] ++ cfg.extraPackages;
in {
options.services.xserver.desktopManager.maxx = {
enable = mkEnableOption "MaXX desktop environment";
extraPackages = mkOption {
type = with types; listOf package;
default = with pkgs; [
xorg.xclock
];
description = ''
Extra packages visible to session.
'';
};
};
config = mkIf (xcfg.enable && cfg.enable) {
environment.systemPackages = [ pkgs.maxx ];
# there is hardcoded path in binaries
system.activationScripts.setup-maxx = ''
mkdir -p /opt
ln -sfn ${pkgs.maxx}/opt/MaXX /opt
'';
services.xserver.desktopManager.session = [
{ name = "MaXX";
start = ''
export PATH="${makeBinPath deps}:$PATH"
export GTK_PATH="${pkgs.gtk-engine-murrine}/lib/gtk-2.0:${pkgs.gtk_engines}/lib/gtk-2.0:$GTK_PATH"
export GDK_PIXBUF_MODULE_FILE=$(echo ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)
exec ${pkgs.maxx}/opt/MaXX/etc/skel/Xsession.dt
'';
}];
};
meta.maintainers = [ maintainers.gnidorah ];
}

View File

@ -0,0 +1,65 @@
{ stdenv, fetchurl
, libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm
, libXinerama, libXdamage, libICE, libXtst
, fontconfig, pango, cairo, glib, libxml2, atk, gtk2, gdk_pixbuf, mesa_noglu, ncurses5
, bash }:
let
version = "Indy-1.0.0";
deps = [
libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
libXinerama libXdamage libICE libXtst
stdenv.cc.cc fontconfig pango cairo glib libxml2 atk gtk2 gdk_pixbuf mesa_noglu ncurses5
];
in stdenv.mkDerivation {
name = "MaXX-${version}";
srcs = [
(fetchurl {
url = "http://maxxinteractive.com/downloads/${version}/FEDORA/MaXX-${version}-NO-ARCH.tar.gz";
sha256 = "004ia6xl8y2hmbq7j98ppgiwffjc62224x9q6w5z17sjibs8xcvx";
})
(fetchurl {
url = "http://maxxinteractive.com/downloads/${version}/FEDORA/MaXX-${version}-x86_64.tar.gz";
sha256 = "134z7hinh01w43m6xiqgh939w5w79860g4kzsd911rfcl3z353av";
})
];
buildPhase = ''
while IFS= read -r -d $'\0' i; do
if isELF "$i"; then
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i" || true
patchelf --set-rpath "${stdenv.lib.makeLibraryPath deps}" "$i"
fi
done < <(find "." -type f -print0)
substituteInPlace bin/adminterm \
--replace /bin/bash ${bash}/bin/bash
substituteInPlace share/misc/HOME/initMaXX-Desktop-Home.sh \
--replace "cp " "cp --no-preserve=mode "
'';
installPhase = ''
maxx=$out/opt/MaXX
mkdir -p "$maxx" $out/share
mv -- ./* "$maxx"
ln -s $maxx/share/icons $out/share
ln -s $maxx/share/themes $out/share
'';
meta = with stdenv.lib; {
description = "A replica of IRIX Interactive Desktop";
homepage = http://www.maxxinteractive.com;
license = licenses.free;
maintainers = [ maintainers.gnidorah ];
platforms = ["x86_64-linux"];
hydraPlatforms = [];
longDescription = ''
A clone of IRIX Interactive Desktop made in agreement with SGI.
Provides simple and fast retro desktop environment.
'';
};
}

View File

@ -17574,6 +17574,8 @@ with pkgs;
callPackage = newScope pkgs.mate;
});
maxx = callPackage ../desktops/maxx { };
pantheon = recurseIntoAttrs rec {
callPackage = newScope pkgs.pantheon;
pantheon-terminal = callPackage ../desktops/pantheon/apps/pantheon-terminal { };