mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
makeSetupHook: make "name" argument mandatory
It's very frustrating to try to read through a derivation graph full of derivations that are all just called "hook", so let's try to avoid that.
This commit is contained in:
parent
0ae87d514f
commit
1fc2a79ee1
@ -278,6 +278,12 @@
|
||||
relying on this should provide their own implementation.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Calling <literal>makeSetupHook</literal> without passing a
|
||||
<literal>name</literal> argument is deprecated.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Qt 5.12 and 5.14 have been removed, as the corresponding
|
||||
|
@ -73,6 +73,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- The EC2 image module previously detected and activated swap-formatted instance store devices and partitions in stage-1 (initramfs). This behaviour has been removed. Users relying on this should provide their own implementation.
|
||||
|
||||
- Calling `makeSetupHook` without passing a `name` argument is deprecated.
|
||||
|
||||
- Qt 5.12 and 5.14 have been removed, as the corresponding branches have been EOL upstream for a long time. This affected under 10 packages in nixpkgs, largely unmaintained upstream as well, however, out-of-tree package expressions may need to be updated manually.
|
||||
|
||||
- In `mastodon` it is now necessary to specify location of file with `PostgreSQL` database password. In `services.mastodon.database.passwordFile` parameter default value `/var/lib/mastodon/secrets/db-password` has been changed to `null`.
|
||||
|
@ -546,6 +546,7 @@ rec {
|
||||
* # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
|
||||
* # bash interpreter.
|
||||
* myhellohookSub = makeSetupHook {
|
||||
* name = "myscript-hook";
|
||||
* deps = [ hello ];
|
||||
* substitutions = { bash = "${pkgs.bash}/bin/bash"; };
|
||||
* meta.platforms = lib.platforms.linux;
|
||||
@ -553,13 +554,21 @@ rec {
|
||||
*
|
||||
* # setup hook with a package test
|
||||
* myhellohookTested = makeSetupHook {
|
||||
* name = "myscript-hook";
|
||||
* deps = [ hello ];
|
||||
* substitutions = { bash = "${pkgs.bash}/bin/bash"; };
|
||||
* meta.platforms = lib.platforms.linux;
|
||||
* passthru.tests.greeting = callPackage ./test { };
|
||||
* } ./myscript.sh;
|
||||
*/
|
||||
makeSetupHook = { name ? "hook", deps ? [], substitutions ? {}, meta ? {}, passthru ? {} }: script:
|
||||
makeSetupHook =
|
||||
{ name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
|
||||
, deps ? []
|
||||
, substitutions ? {}
|
||||
, meta ? {}
|
||||
, passthru ? {}
|
||||
}:
|
||||
script:
|
||||
runCommand name
|
||||
(substitutions // {
|
||||
inherit meta;
|
||||
|
Loading…
Reference in New Issue
Block a user