mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge pull request #11680 from Mic92/git-utils
git-utils: fix x86_64-w64-mingw32 build
This commit is contained in:
commit
ab0f9f9089
2 changed files with 12 additions and 7 deletions
|
@ -208,7 +208,7 @@ static git_packbuilder_progress PACKBUILDER_PROGRESS_CHECK_INTERRUPT = &packBuil
|
||||||
static void initRepoAtomically(std::filesystem::path &path, bool bare) {
|
static void initRepoAtomically(std::filesystem::path &path, bool bare) {
|
||||||
if (pathExists(path.string())) return;
|
if (pathExists(path.string())) return;
|
||||||
|
|
||||||
Path tmpDir = createTempDir(std::filesystem::path(path).parent_path());
|
Path tmpDir = createTempDir(os_string_to_string(PathViewNG { std::filesystem::path(path).parent_path() }));
|
||||||
AutoDelete delTmpDir(tmpDir, true);
|
AutoDelete delTmpDir(tmpDir, true);
|
||||||
Repository tmpRepo;
|
Repository tmpRepo;
|
||||||
|
|
||||||
|
|
|
@ -212,18 +212,23 @@ nix_symlinks = [
|
||||||
'nix-store',
|
'nix-store',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
executable_suffix = ''
|
||||||
|
if host_machine.system() == 'windows'
|
||||||
|
executable_suffix = '.exe'
|
||||||
|
endif
|
||||||
|
|
||||||
foreach linkname : nix_symlinks
|
foreach linkname : nix_symlinks
|
||||||
install_symlink(
|
install_symlink(
|
||||||
linkname,
|
linkname + executable_suffix,
|
||||||
# TODO(Qyriad): should these continue to be relative symlinks?
|
# TODO(Qyriad): should these continue to be relative symlinks?
|
||||||
pointing_to : 'nix',
|
pointing_to : fs.name(this_exe),
|
||||||
install_dir : get_option('bindir'),
|
install_dir : get_option('bindir'),
|
||||||
# The 'runtime' tag is what executables default to, which we want to emulate here.
|
# The 'runtime' tag is what executables default to, which we want to emulate here.
|
||||||
install_tag : 'runtime'
|
install_tag : 'runtime'
|
||||||
)
|
)
|
||||||
t = custom_target(
|
t = custom_target(
|
||||||
command: ['ln', '-sf', fs.name(this_exe), '@OUTPUT@'],
|
command: ['ln', '-sf', fs.name(this_exe), '@OUTPUT@'],
|
||||||
output: linkname,
|
output: linkname + executable_suffix,
|
||||||
# TODO(Ericson2314): Don't do this once we have the `meson.override_find_program` working)
|
# TODO(Ericson2314): Don't do this once we have the `meson.override_find_program` working)
|
||||||
build_by_default: true
|
build_by_default: true
|
||||||
)
|
)
|
||||||
|
@ -233,15 +238,15 @@ endforeach
|
||||||
|
|
||||||
install_symlink(
|
install_symlink(
|
||||||
'build-remote',
|
'build-remote',
|
||||||
pointing_to : '..' / '..'/ get_option('bindir') / 'nix',
|
pointing_to : '..' / '..'/ get_option('bindir') / fs.name(this_exe),
|
||||||
install_dir : get_option('libexecdir') / 'nix',
|
install_dir : get_option('libexecdir') / fs.name(this_exe),
|
||||||
# The 'runtime' tag is what executables default to, which we want to emulate here.
|
# The 'runtime' tag is what executables default to, which we want to emulate here.
|
||||||
install_tag : 'runtime'
|
install_tag : 'runtime'
|
||||||
)
|
)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
command: ['ln', '-sf', fs.name(this_exe), '@OUTPUT@'],
|
command: ['ln', '-sf', fs.name(this_exe), '@OUTPUT@'],
|
||||||
output: 'build-remote',
|
output: 'build-remote' + executable_suffix,
|
||||||
# TODO(Ericson2314): Don't do this once we have the `meson.override_find_program` working)
|
# TODO(Ericson2314): Don't do this once we have the `meson.override_find_program` working)
|
||||||
build_by_default: true
|
build_by_default: true
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue