diff --git a/pkgs/os-specific/linux/splashutils/default.nix b/pkgs/os-specific/linux/splashutils/1.3.nix similarity index 86% rename from pkgs/os-specific/linux/splashutils/default.nix rename to pkgs/os-specific/linux/splashutils/1.3.nix index 7af2f882f958..157690805f3c 100644 --- a/pkgs/os-specific/linux/splashutils/default.nix +++ b/pkgs/os-specific/linux/splashutils/1.3.nix @@ -26,4 +26,10 @@ stdenv.mkDerivation { #makeFlags = "QUIET=false; installPhase = "ensureDir $out/bin; cp objs/splash_helper objs/splash_util objs/splash_util.static $out/bin"; + + passthru = { + helperName = "bin/splash_helper"; + controlName = "bin/splash_util"; + helperProcFile = "/proc/sys/kernel/fbsplash"; + }; } diff --git a/pkgs/os-specific/linux/splashutils/1.5.nix b/pkgs/os-specific/linux/splashutils/1.5.nix new file mode 100644 index 000000000000..7f0bce7dff95 --- /dev/null +++ b/pkgs/os-specific/linux/splashutils/1.5.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl, klibc, zlib, libjpeg}: + +stdenv.mkDerivation { + name = "splashutils-1.5.4.1"; + + src = fetchurl { + url = http://download.berlios.de/fbsplash/splashutils-1.5.4.1.tar.bz2; + sha256 = "0pwv9l6a042hhcwpi4kqdzjg7d1mrlix0fvgqqzqh93mc54z9lf7"; + }; + + buildInputs = [klibc zlib libjpeg]; + + dontAddPrefix = 1; + + configureFlags = "--without-ttf --without-png --without-gpm --with-themedir=/etc/splash"; + + preConfigure = '' + configureFlags="$configureFlags --with-essential-prefix=$out --with-libdir=/" + substituteInPlace src/common.h \ + --replace 'FBSPLASH_DIR"/sys"' '"/sys"' \ + --replace 'FBSPLASH_DIR"/proc"' '"/proc"' + ''; + + CPP = "gcc -E"; + CXXCPP = "g++ -E"; + + passthru = { + helperName = "sbin/fbcondecor_helper"; + controlName = "sbin/fbcondecor_ctl"; + helperProcFile = "/proc/sys/kernel/fbcondecor"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e1c78e866ab..e8869a160e09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4896,7 +4896,18 @@ let pkgs = rec { inherit stdenv klibc; }; - splashutils = import ../os-specific/linux/splashutils { + splashutils = + if kernel.features ? fbSplash then splashutils_13 else + if kernel.features ? fbConDecor then splashutils_15 else + null; + + splashutils_13 = import ../os-specific/linux/splashutils/1.3.nix { + inherit fetchurl stdenv klibc; + zlib = zlibStatic; + libjpeg = libjpegStatic; + }; + + splashutils_15 = import ../os-specific/linux/splashutils/1.5.nix { inherit fetchurl stdenv klibc; zlib = zlibStatic; libjpeg = libjpegStatic;