nixpkgs/pkgs/desktops/maxx/default.nix

78 lines
2.6 KiB
Nix
Raw Normal View History

2019-04-14 08:51:29 +02:00
{ stdenv, fetchurl, makeWrapper, autoPatchelfHook, gnused
, gcc, bash, gtk-engine-murrine, gtk_engines, librsvg
2017-08-24 18:34:08 +02:00
2017-07-04 12:42:53 +02:00
, libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm
2017-08-24 18:34:08 +02:00
, libXinerama, libXdamage, libICE, libXtst, libXaw, fontconfig, pango, cairo, glib, libxml2, atk, gtk2
2019-05-22 13:03:39 +02:00
, gdk-pixbuf, libGL, ncurses5
2017-08-24 18:34:08 +02:00
2019-04-14 08:51:29 +02:00
, dmidecode, pciutils, usbutils
}:
2017-07-04 12:42:53 +02:00
2019-04-14 08:51:29 +02:00
stdenv.mkDerivation rec {
pname = "MaXX";
version = "2.0.1";
codename = "Indigo";
2017-07-04 12:42:53 +02:00
srcs = [
(fetchurl {
2019-04-14 08:51:29 +02:00
url = "http://maxxdesktop.arcadedaydream.com/${codename}-Releases/Installers/MaXX-${codename}-${version}-x86_64.tar.gz";
sha256 = "17hd3j8773kmvvhyf657in6zmhnw4mbvyn4r6dfip5bdaz66pj01";
2017-07-04 12:42:53 +02:00
})
];
2019-04-14 08:51:29 +02:00
nativeBuildInputs = [ makeWrapper autoPatchelfHook gnused ];
2018-05-17 21:54:57 +02:00
buildInputs = [
stdenv.cc.cc libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
libXinerama libXdamage libICE libXtst libXaw fontconfig pango cairo glib libxml2 atk gtk2
2019-05-22 13:03:39 +02:00
gdk-pixbuf libGL ncurses5
2018-05-17 21:54:57 +02:00
];
2017-08-14 10:13:49 +02:00
2017-07-04 12:42:53 +02:00
buildPhase = ''
2019-04-14 08:51:29 +02:00
sed -i "s/\(LD_LIBRARY_PATH=.*\)$/\1:\$LD_LIBRARY_PATH/p" etc/system.desktopenv
2017-07-04 12:42:53 +02:00
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 $maxx/sbin
2017-07-04 12:42:53 +02:00
mv -- ./* "$maxx"
ln -s $maxx/share/icons $out/share
2017-08-14 10:13:49 +02:00
wrapProgram $maxx/etc/skel/Xsession.dt \
--prefix GTK_PATH : "${gtk-engine-murrine}/lib/gtk-2.0:${gtk_engines}/lib/gtk-2.0" \
2019-04-14 08:51:29 +02:00
--prefix GDK_PIXBUF_MODULE_FILE : "$(echo ${librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)"
2017-07-04 12:42:53 +02:00
while IFS= read -r -d ''$'\0' i; do
2018-05-17 21:54:57 +02:00
if isExecutable "$i"; then
wrapProgram "$i" \
2019-04-14 08:51:29 +02:00
--prefix PATH : ${gcc}/bin
2017-08-24 18:34:08 +02:00
fi
done < <(find "$maxx" -type f -print0)
2019-04-14 08:51:29 +02:00
wrapProgram $maxx/bin/hinv \
--prefix PATH : ${stdenv.lib.makeBinPath [ dmidecode pciutils usbutils ]}
2017-08-24 18:34:08 +02:00
'';
2017-08-14 10:13:49 +02:00
2017-07-04 12:42:53 +02:00
meta = with stdenv.lib; {
description = "A replica of IRIX Interactive Desktop";
2019-04-14 08:51:29 +02:00
homepage = https://www.facebook.com/maxxdesktop/;
2017-08-24 18:34:08 +02:00
license = {
fullName = "The MaXX Interactive Desktop for Linux License Agreement";
2019-04-14 08:51:29 +02:00
url = http://maxxdesktop.arcadedaydream.com/Indigo-Releases/docs/license.html;
free = false; # redistribution is only allowed to *some* hardware, etc.
2017-08-24 18:34:08 +02:00
};
2017-07-04 12:42:53 +02:00
maintainers = [ maintainers.gnidorah ];
platforms = ["x86_64-linux"];
longDescription = ''
2019-05-22 13:03:39 +02:00
A clone of IRIX Interactive Desktop made in agreement with SGI.
2017-07-04 12:42:53 +02:00
Provides simple and fast retro desktop environment.
'';
};
}