Skip to content

Commit

Permalink
util-linux: Clean up to use less bash
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Aug 2, 2018
1 parent e517da3 commit f83b5e4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkgs/os-specific/linux/util-linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ in stdenv.mkDerivation rec {
--replace "/bin/umount" "$out/bin/umount"
'';

preConfigure = lib.optionalString (systemd != null) ''
configureFlags+=" --with-systemd --with-systemdsystemunitdir=$bin/lib/systemd/system/"
'';

# !!! It would be better to obtain the path to the mount helpers
# (/sbin/mount.*) through an environment variable, but that's
# somewhat risky because we have to consider that mount can setuid
Expand All @@ -43,8 +39,11 @@ in stdenv.mkDerivation rec {
"--disable-use-tty-group"
"--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin"
"--disable-makeinstall-setuid" "--disable-makeinstall-chown"
] ++ lib.optional (ncurses == null) "--without-ncurses"
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
(lib.withFeature (ncurses != null) "ncurses")
(lib.withFeature (systemd != null) "systemd")
(lib.withFeatureAs (systemd != null)
"systemdsystemunitdir" "$bin/lib/systemd/system/")

This comment has been minimized.

Copy link
@dezgeg

dezgeg Aug 12, 2018

Contributor

This doesn't shell-expand $bin.

This comment has been minimized.

Copy link
@vcunat

vcunat Aug 13, 2018

Member

Hmm, this was a silent failure – I hope there aren't more of such :-( Seems fixed correctly by ed45e73.

@Ericson2314: while I prefer cleaner code, for future similar refactorings, please, either do them more carefully or stabilize them in a separate branch first, so there's not so much fallout in the staging* phase.

This comment has been minimized.

Copy link
@Ericson2314

Ericson2314 Aug 13, 2018

Author Member

Sorry will do. [There was a few times I thought I saw something suspicious that looked like it wouldn't expand, but I didn't mean to introduce any of that myself.]

] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"scanf_cv_type_modifier=ms"
;

Expand Down

3 comments on commit f83b5e4

@vcunat
Copy link
Member

@vcunat vcunat commented on f83b5e4 Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional passing of --with-ncurses broke the build (on staging-next now). Reverting this commit would "fix" that, but it's possible it just exposed another problem. Log.

@vcunat
Copy link
Member

@vcunat vcunat commented on f83b5e4 Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved by #44719. Thanks @symphorien for noticing that; I should have searched the tickets before commenting.

@Ericson2314
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and sorry

Please sign in to comment.