Skip to content

mktemp from coreutils doesn't work on darwin #38578

@fkorotkov

Description

@fkorotkov

Issue description

mktemp fails with too few X's in template on Darwin when tries to create a temporary directory.

Steps to reproduce

$: nix-shell --packages coreutils --run "which mktemp && mktemp -d -t foo"
/nix/store/s28xb9v7xf6axvf4a3av2mnczws2hsdg-coreutils-8.29/bin/mktemp
mktemp: too few X's in template ‘foo’

Technical details

$: nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
  /nix/store/aiaqhmk1x114msypcykhi27n6iydrhjm-nix-info
  /nix/store/ln5498nmkjkv1ssa2x644czc7x1xwcx6-DarwinTools-1
copying path '/nix/store/ln5498nmkjkv1ssa2x644czc7x1xwcx6-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/aiaqhmk1x114msypcykhi27n6iydrhjm-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 16.7.0, macOS 10.12.6`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0`
 - channels(root): `"nixpkgs-18.09pre133932.ee28e35ba37"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

/cc maintainer @edolstra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions