From 3b445042ac00fb28aa0a74568a2c30f65afde807 Mon Sep 17 00:00:00 2001 From: Christian Kauhaus Date: Thu, 6 Dec 2018 17:22:31 +0100 Subject: [PATCH] rPackages.littler: fix build (#51282) littler gives a wrapped called `r` (or `lr` for non-case-preserving systems like Darwin) which works as shebang or pipe target. The build was completely broken before (missing deps). Symlink executables and manpage into standard locations so that this packages also works in `environment.systemPackages`. --- pkgs/development/r-modules/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 428d6c60546..27b38138f6d 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -950,6 +950,18 @@ let preConfigure = "patchShebangs configure"; }); + littler = old.littler.overrideAttrs (attrs: with pkgs; { + buildInputs = [ pcre lzma zlib bzip2 icu which ] ++ attrs.buildInputs; + postInstall = '' + install -d $out/bin $out/share/man/man1 + ln -s ../library/littler/bin/r $out/bin/r + ln -s ../library/littler/bin/r $out/bin/lr + ln -s ../../../library/littler/man-page/r.1 $out/share/man/man1 + # these won't run without special provisions, so better remove them + rm -r $out/library/littler/script-tests + ''; + }); + }; in self