skawarePackages.execline: wrap execlineb with tools

The execlineb program is the launcher (and lexer) of execline scripts.
So it makes a lot of sense to have all the small tools in scope by
default.
We append to the end of PATH so that they can be easily overwritten by
the user.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
Profpatsch 2019-02-23 21:12:16 +01:00
parent fae3c6fb9e
commit b64d25c447
2 changed files with 14 additions and 1 deletions

View File

@ -19,6 +19,10 @@ in {
# mostly for moving and deleting files from the build directory # mostly for moving and deleting files from the build directory
# : lines # : lines
, postInstall , postInstall
# packages with setup hooks that should be run
# (see definition of `makeSetupHook`)
# : list drv
, setupHooks ? []
# : list Maintainer # : list Maintainer
, maintainers ? [] , maintainers ? []
@ -82,6 +86,8 @@ in stdenv.mkDerivation {
dontDisableStatic = true; dontDisableStatic = true;
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = setupHooks;
configureFlags = configureFlags ++ [ configureFlags = configureFlags ++ [
"--enable-absolute-paths" "--enable-absolute-paths"
(if stdenv.isDarwin (if stdenv.isDarwin

View File

@ -1,4 +1,4 @@
{ stdenv, skawarePackages }: { stdenv, skawarePackages, makeWrapper }:
with skawarePackages; with skawarePackages;
@ -11,6 +11,8 @@ buildPackage {
outputs = [ "bin" "lib" "dev" "doc" "out" ]; outputs = [ "bin" "lib" "dev" "doc" "out" ];
setupHooks = [ makeWrapper ];
# TODO: nsss support # TODO: nsss support
configureFlags = [ configureFlags = [
"--libdir=\${lib}/lib" "--libdir=\${lib}/lib"
@ -30,6 +32,11 @@ buildPackage {
mv doc $doc/share/doc/execline/html mv doc $doc/share/doc/execline/html
mv examples $doc/share/doc/execline/examples mv examples $doc/share/doc/execline/examples
# finally, add all tools to PATH so they are available
# from within execlineb scripts by default
wrapProgram $bin/bin/execlineb \
--suffix PATH : $bin/bin
''; '';
} }