nixpkgs/pkgs/desktops/maxx/default.nix

78 lines
2.6 KiB
Nix
Raw Normal View History

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