2018-05-17 20:54:57 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, autoPatchelfHook
|
|
|
|
, libredirect, gcc-unwrapped, 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
|
2018-02-24 12:06:44 +00:00
|
|
|
, gdk_pixbuf, libGL, ncurses
|
2017-08-24 17:34:08 +01:00
|
|
|
|
|
|
|
, xclock, xsettingsd }:
|
2017-07-04 11:42:53 +01:00
|
|
|
|
|
|
|
let
|
2017-07-24 11:19:45 +01:00
|
|
|
version = "Indy-1.1.0";
|
2017-07-04 11:42:53 +01:00
|
|
|
|
2017-08-24 17:34:08 +01:00
|
|
|
runtime_deps = [
|
|
|
|
xclock xsettingsd
|
2017-07-04 11:42:53 +01:00
|
|
|
];
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "MaXX-${version}";
|
|
|
|
|
|
|
|
srcs = [
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://maxxinteractive.com/downloads/${version}/FEDORA/MaXX-${version}-NO-ARCH.tar.gz";
|
2017-07-24 11:19:45 +01:00
|
|
|
sha256 = "1d23j08wwrrn5cp7csv70pcz9jppcn0xb1894wkp0caaliy7g31y";
|
2017-07-04 11:42:53 +01:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "http://maxxinteractive.com/downloads/${version}/FEDORA/MaXX-${version}-x86_64.tar.gz";
|
2017-07-24 11:19:45 +01:00
|
|
|
sha256 = "156p2lra184wyvibrihisd7cr1ivqaygsf0zfm26a12gx23b7708";
|
2017-07-04 11:42:53 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-05-17 20:54:57 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
|
|
|
|
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
|
|
|
|
gdk_pixbuf libGL ncurses
|
|
|
|
];
|
2017-08-14 09:13:49 +01:00
|
|
|
|
2017-07-04 11:42:53 +01:00
|
|
|
buildPhase = ''
|
2017-08-27 16:03:46 +01:00
|
|
|
while IFS= read -r -d ''$'\0' i; do
|
2017-08-24 17:34:08 +01:00
|
|
|
substituteInPlace "$i" --replace /opt/MaXX $out/opt/MaXX
|
|
|
|
done < <(find "." -type f -exec grep -Iq /opt/MaXX {} \; -and -print0)
|
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
|
2017-09-05 14:49:49 +01:00
|
|
|
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" \
|
2017-08-24 17:34:08 +01:00
|
|
|
--prefix GDK_PIXBUF_MODULE_FILE : "$(echo ${librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)" \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath runtime_deps}
|
2017-07-04 11:42:53 +01:00
|
|
|
|
2017-08-27 16:03:46 +01:00
|
|
|
while IFS= read -r -d ''$'\0' i; do
|
2018-05-17 20:54:57 +01:00
|
|
|
if isExecutable "$i"; then
|
|
|
|
wrapProgram "$i" \
|
|
|
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
|
|
|
--set NIX_REDIRECTS /opt/MaXX=$maxx \
|
|
|
|
--prefix PATH : $maxx/sbin
|
2017-08-24 17:34:08 +01:00
|
|
|
fi
|
|
|
|
done < <(find "$maxx" -type f -print0)
|
|
|
|
|
2017-09-05 14:49:49 +01:00
|
|
|
cp ${gcc-unwrapped}/bin/cpp ${gcc-unwrapped}/libexec/gcc/*/*/cc1 $maxx/sbin
|
|
|
|
for i in $maxx/sbin/cpp $maxx/sbin/cc1
|
2017-08-24 17:34:08 +01:00
|
|
|
do
|
|
|
|
wrapProgram "$i" \
|
|
|
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
|
|
|
--set NIX_REDIRECTS /opt/MaXX=$maxx
|
|
|
|
done
|
|
|
|
'';
|
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";
|
|
|
|
homepage = http://www.maxxinteractive.com;
|
2017-08-24 17:34:08 +01:00
|
|
|
license = {
|
2017-09-04 21:57:03 +01:00
|
|
|
fullName = "The MaXX Interactive Desktop for Linux License Agreement";
|
2017-08-24 17:34:08 +01:00
|
|
|
url = http://www.maxxinteractive.com/site/?page_id=97;
|
2017-09-04 21:57:03 +01:00
|
|
|
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 = ''
|
|
|
|
A clone of IRIX Interactive Desktop made in agreement with SGI.
|
|
|
|
Provides simple and fast retro desktop environment.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|