2018-07-21 00:44:44 +00:00
|
|
|
{ fetchhg, stdenv, xorg, makeWrapper }:
|
2014-06-24 23:52:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
# Inferno is a rolling release from a mercurial repository. For the verison number
|
|
|
|
# of the package I'm using the mercurial commit number.
|
2016-02-28 13:48:54 +00:00
|
|
|
rev = "785";
|
|
|
|
name = "inferno-${rev}";
|
|
|
|
host = "Linux";
|
|
|
|
objtype = "386";
|
2014-06-24 23:52:53 +00:00
|
|
|
|
|
|
|
src = fetchhg {
|
2016-02-28 13:48:54 +00:00
|
|
|
url = "https://bitbucket.org/inferno-os/inferno-os";
|
|
|
|
sha256 = "1b428ma9fi5skvfrxp91dr43a62kax89wmx7950ahc1cxyx90k7x";
|
2014-06-24 23:52:53 +00:00
|
|
|
};
|
|
|
|
|
2016-02-28 13:48:54 +00:00
|
|
|
buildInputs = [ makeWrapper ] ++ (with xorg; [ libX11 libXpm libXext xextproto ]);
|
2014-06-24 23:52:53 +00:00
|
|
|
|
|
|
|
infernoWrapper = ./inferno;
|
|
|
|
|
|
|
|
configurePhase = ''
|
2016-02-28 13:48:54 +00:00
|
|
|
sed -e 's@^ROOT=.*$@ROOT='"$out"'/share/inferno@g' \
|
|
|
|
-e 's@^OBJTYPE=.*$@OBJTYPE=${objtype}@g' \
|
|
|
|
-e 's@^SYSHOST=.*$@SYSHOST=${host}@g' \
|
|
|
|
-i mkconfig
|
|
|
|
# Get rid of an annoying warning
|
|
|
|
sed -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/g' \
|
|
|
|
-i ${host}/${objtype}/include/lib9.h
|
2014-06-24 23:52:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out/share/inferno
|
|
|
|
cp -r . $out/share/inferno
|
|
|
|
./makemk.sh
|
2016-02-28 13:48:54 +00:00
|
|
|
export PATH=$PATH:$out/share/inferno/Linux/386/bin
|
2014-06-24 23:52:53 +00:00
|
|
|
mk nuke
|
|
|
|
mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-02-28 13:48:54 +00:00
|
|
|
# Installs executables in $out/share/inferno/${host}/${objtype}/bin
|
2014-06-24 23:52:53 +00:00
|
|
|
mk install
|
|
|
|
mkdir -p $out/bin
|
2016-02-28 13:48:54 +00:00
|
|
|
# Install start-up script
|
2014-06-24 23:52:53 +00:00
|
|
|
makeWrapper $infernoWrapper $out/bin/inferno \
|
|
|
|
--suffix PATH ':' "$out/share/inferno/Linux/386/bin" \
|
|
|
|
--set INFERNO_ROOT "$out/share/inferno"
|
|
|
|
'';
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "fortify" ];
|
2016-02-22 01:43:25 +00:00
|
|
|
|
2014-06-24 23:52:53 +00:00
|
|
|
meta = {
|
|
|
|
description = "A compact distributed operating system for building cross-platform distributed systems";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://inferno-os.org/;
|
2014-06-24 23:52:53 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2016-02-28 13:48:54 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ doublec kovirobi ];
|
2014-06-24 23:52:53 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|