···594595596 /*
597- Make a package that just contains a setup hook with the given contents.
598- This setup hook will be invoked by any package that includes this package
599- as a buildInput. Optionally takes a list of substitutions that should be
600- applied to the resulting script.
601-602- Examples:
603- # setup hook that depends on the hello package and runs ./myscript.sh
604- myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
605-606- # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
607- # bash interpreter.
608- myhellohookSub = makeSetupHook {
609- name = "myscript-hook";
610- deps = [ hello ];
611- substitutions = { bash = "${pkgs.bash}/bin/bash"; };
612- meta.platforms = lib.platforms.linux;
613- } ./myscript.sh;
614-615- # setup hook with a package test
616- myhellohookTested = makeSetupHook {
617- name = "myscript-hook";
618- deps = [ hello ];
619- substitutions = { bash = "${pkgs.bash}/bin/bash"; };
620- meta.platforms = lib.platforms.linux;
621- passthru.tests.greeting = callPackage ./test { };
622- } ./myscript.sh;
623 */
624 makeSetupHook =
625 { name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
···594595596 /*
597+ * Make a package that just contains a setup hook with the given contents.
598+ * This setup hook will be invoked by any package that includes this package
599+ * as a buildInput. Optionally takes a list of substitutions that should be
600+ * applied to the resulting script.
601+ *
602+ * Examples:
603+ * # setup hook that depends on the hello package and runs ./myscript.sh
604+ * myhellohook = makeSetupHook { propagatedBuildInputs = [ hello ]; } ./myscript.sh;
605+ *
606+ * # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
607+ * # bash interpreter.
608+ * myhellohookSub = makeSetupHook {
609+ * name = "myscript-hook";
610+ * propagatedBuildInputs = [ hello ];
611+ * substitutions = { bash = "${pkgs.bash}/bin/bash"; };
612+ * meta.platforms = lib.platforms.linux;
613+ * } ./myscript.sh;
614+ *
615+ * # setup hook with a package test
616+ * myhellohookTested = makeSetupHook {
617+ * name = "myscript-hook";
618+ * propagatedBuildInputs = [ hello ];
619+ * substitutions = { bash = "${pkgs.bash}/bin/bash"; };
620+ * meta.platforms = lib.platforms.linux;
621+ * passthru.tests.greeting = callPackage ./test { };
622+ * } ./myscript.sh;
623 */
624 makeSetupHook =
625 { name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
···27 luarocksCheckHook = callPackage ({ luarocks }:
28 makeSetupHook {
29 name = "luarocks-check-hook";
30- deps = [ luarocks ];
31 } ./luarocks-check-hook.sh) {};
3233 # luarocks installs data in a non-overridable location. Until a proper luarocks patch,
···35 luarocksMoveDataFolder = callPackage ({ }:
36 makeSetupHook {
37 name = "luarocks-move-rock";
38- deps = [ ];
39 } ./luarocks-move-data.sh) {};
40}
···27 luarocksCheckHook = callPackage ({ luarocks }:
28 makeSetupHook {
29 name = "luarocks-check-hook";
30+ propagatedBuildInputs = [ luarocks ];
31 } ./luarocks-check-hook.sh) {};
3233 # luarocks installs data in a non-overridable location. Until a proper luarocks patch,
···35 luarocksMoveDataFolder = callPackage ({ }:
36 makeSetupHook {
37 name = "luarocks-move-rock";
38+ propagatedBuildInputs = [ ];
39 } ./luarocks-move-data.sh) {};
40}
+1-1
pkgs/development/interpreters/lua-5/wrap-lua.nix
···8# imported as wrapLua in lua-packages.nix and passed to build-lua-derivation to be used as buildInput
9makeSetupHook {
10 name = "wrap-lua-hook";
11- deps = [ makeWrapper ];
12 substitutions.executable = lua.interpreter;
13 substitutions.lua = lua;
14 substitutions.LuaPathSearchPaths = lib.escapeShellArgs lua.LuaPathSearchPaths;
···8# imported as wrapLua in lua-packages.nix and passed to build-lua-derivation to be used as buildInput
9makeSetupHook {
10 name = "wrap-lua-hook";
11+ propagatedBuildInputs = [ makeWrapper ];
12 substitutions.executable = lua.interpreter;
13 substitutions.lua = lua;
14 substitutions.LuaPathSearchPaths = lib.escapeShellArgs lua.LuaPathSearchPaths;
···10# Each of the substitutions is available in the wrap.sh script as @thingSubstituted@
11makeSetupHook {
12 name = "${octave.name}-pkgs-setup-hook";
13- deps = [ makeWrapper ];
14 substitutions.executable = octave.interpreter;
15 substitutions.octave = octave;
16} ./wrap.sh
···10# Each of the substitutions is available in the wrap.sh script as @thingSubstituted@
11makeSetupHook {
12 name = "${octave.name}-pkgs-setup-hook";
13+ propagatedBuildInputs = [ makeWrapper ];
14 substitutions.executable = octave.interpreter;
15 substitutions.octave = octave;
16} ./wrap.sh