···126 lib.warn "getLicenseFromSpdxId: No license matches the given SPDX ID: ${licstr}"
127 { shortName = licstr; }
128 );
00000000000000129}
···126 lib.warn "getLicenseFromSpdxId: No license matches the given SPDX ID: ${licstr}"
127 { shortName = licstr; }
128 );
129+130+ /* Get the path to the main program of a derivation with either
131+ meta.mainProgram or pname or name
132+133+ Type: getExe :: derivation -> string
134+135+ Example:
136+ getExe pkgs.hello
137+ => "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello"
138+ getExe pkgs.mustache-go
139+ => "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache"
140+ */
141+ getExe = x:
142+ "${lib.getBin x}/bin/${x.meta.mainProgram or (lib.getName x)}";
143}
+2-2
nixos/modules/tasks/filesystems/xfs.nix
···1516 boot.initrd.availableKernelModules = mkIf inInitrd [ "xfs" "crc32c" ];
1718- boot.initrd.extraUtilsCommands = mkIf (inInitrd && !boot.initrd.systemd.enable)
19 ''
20 copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/fsck.xfs
21 copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/xfs_repair
22 '';
2324 # Trick just to set 'sh' after the extraUtils nuke-refs.
25- boot.initrd.extraUtilsCommandsTest = mkIf (inInitrd && !boot.initrd.systemd.enable)
26 ''
27 sed -i -e 's,^#!.*,#!'$out/bin/sh, $out/bin/fsck.xfs
28 '';
···1516 boot.initrd.availableKernelModules = mkIf inInitrd [ "xfs" "crc32c" ];
1718+ boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable)
19 ''
20 copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/fsck.xfs
21 copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/xfs_repair
22 '';
2324 # Trick just to set 'sh' after the extraUtils nuke-refs.
25+ boot.initrd.extraUtilsCommandsTest = mkIf (inInitrd && !config.boot.initrd.systemd.enable)
26 ''
27 sed -i -e 's,^#!.*,#!'$out/bin/sh, $out/bin/fsck.xfs
28 '';