nixpkgs/pkgs/desktops/maxx/default.nix

73 lines
2.4 KiB
Nix
Raw Normal View History

2017-08-14 08:13:49 +00:00
{ stdenv, fetchurl, makeWrapper
2017-07-04 10:42:53 +00:00
, libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm
2017-07-24 10:19:45 +00:00
, libXinerama, libXdamage, libICE, libXtst, libXaw
, fontconfig, pango, cairo, glib, libxml2, atk, gtk2, gdk_pixbuf, mesa_noglu, ncurses
2017-08-14 08:13:49 +00:00
, gcc, xclock, xsettingsd, bash, gtk-engine-murrine, gtk_engines, librsvg }:
2017-07-04 10:42:53 +00:00
let
2017-07-24 10:19:45 +00:00
version = "Indy-1.1.0";
2017-07-04 10:42:53 +00:00
deps = [
libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
2017-07-24 10:19:45 +00:00
libXinerama libXdamage libICE libXtst libXaw
stdenv.cc.cc fontconfig pango cairo glib libxml2 atk gtk2 gdk_pixbuf mesa_noglu ncurses
2017-07-04 10:42:53 +00: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 10:19:45 +00:00
sha256 = "1d23j08wwrrn5cp7csv70pcz9jppcn0xb1894wkp0caaliy7g31y";
2017-07-04 10:42:53 +00:00
})
(fetchurl {
url = "http://maxxinteractive.com/downloads/${version}/FEDORA/MaXX-${version}-x86_64.tar.gz";
2017-07-24 10:19:45 +00:00
sha256 = "156p2lra184wyvibrihisd7cr1ivqaygsf0zfm26a12gx23b7708";
2017-07-04 10:42:53 +00:00
})
];
2017-08-14 08:13:49 +00:00
buildInputs = [ makeWrapper ];
2017-07-04 10:42:53 +00:00
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
2017-08-14 08:13:49 +00:00
wrapProgram $maxx/etc/skel/Xsession.dt \
--prefix GTK_PATH : "${gtk-engine-murrine}/lib/gtk-2.0:${gtk_engines}/lib/gtk-2.0" \
--prefix GDK_PIXBUF_MODULE_FILE : "$(echo ${librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)"
2017-07-04 10:42:53 +00:00
'';
2017-08-14 08:13:49 +00:00
propagatedUserEnvPkgs = [ gcc xclock xsettingsd ];
2017-07-04 10:42:53 +00:00
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.
'';
};
}