···594594595595596596 /*
597597- Make a package that just contains a setup hook with the given contents.
598598- This setup hook will be invoked by any package that includes this package
599599- as a buildInput. Optionally takes a list of substitutions that should be
600600- applied to the resulting script.
601601-602602- Examples:
603603- # setup hook that depends on the hello package and runs ./myscript.sh
604604- myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
605605-606606- # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
607607- # bash interpreter.
608608- myhellohookSub = makeSetupHook {
609609- name = "myscript-hook";
610610- deps = [ hello ];
611611- substitutions = { bash = "${pkgs.bash}/bin/bash"; };
612612- meta.platforms = lib.platforms.linux;
613613- } ./myscript.sh;
614614-615615- # setup hook with a package test
616616- myhellohookTested = makeSetupHook {
617617- name = "myscript-hook";
618618- deps = [ hello ];
619619- substitutions = { bash = "${pkgs.bash}/bin/bash"; };
620620- meta.platforms = lib.platforms.linux;
621621- passthru.tests.greeting = callPackage ./test { };
622622- } ./myscript.sh;
597597+ * Make a package that just contains a setup hook with the given contents.
598598+ * This setup hook will be invoked by any package that includes this package
599599+ * as a buildInput. Optionally takes a list of substitutions that should be
600600+ * applied to the resulting script.
601601+ *
602602+ * Examples:
603603+ * # setup hook that depends on the hello package and runs ./myscript.sh
604604+ * myhellohook = makeSetupHook { propagatedBuildInputs = [ hello ]; } ./myscript.sh;
605605+ *
606606+ * # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
607607+ * # bash interpreter.
608608+ * myhellohookSub = makeSetupHook {
609609+ * name = "myscript-hook";
610610+ * propagatedBuildInputs = [ hello ];
611611+ * substitutions = { bash = "${pkgs.bash}/bin/bash"; };
612612+ * meta.platforms = lib.platforms.linux;
613613+ * } ./myscript.sh;
614614+ *
615615+ * # setup hook with a package test
616616+ * myhellohookTested = makeSetupHook {
617617+ * name = "myscript-hook";
618618+ * propagatedBuildInputs = [ hello ];
619619+ * substitutions = { bash = "${pkgs.bash}/bin/bash"; };
620620+ * meta.platforms = lib.platforms.linux;
621621+ * passthru.tests.greeting = callPackage ./test { };
622622+ * } ./myscript.sh;
623623 */
624624 makeSetupHook =
625625 { name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
···1010# Each of the substitutions is available in the wrap.sh script as @thingSubstituted@
1111makeSetupHook {
1212 name = "${octave.name}-pkgs-setup-hook";
1313- deps = [ makeWrapper ];
1313+ propagatedBuildInputs = [ makeWrapper ];
1414 substitutions.executable = octave.interpreter;
1515 substitutions.octave = octave;
1616} ./wrap.sh