mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
Make tar invocation portable, fix OpenBSD build/test
At least on OpenBSD, tar(1) reads from /dev/rst0 not stdin by default options must specififed consistently with or without dashes, not mixed. Specify standard input explicitly to not rely on implementation details. Use either option style consistently.
This commit is contained in:
parent
2dff8c2b40
commit
fda598cfdd
2 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
|
|||
Path tmpDir = createTempDir();
|
||||
AutoDelete delTmpDir(tmpDir, true);
|
||||
|
||||
runProgram("tar", true, { "x", "-C", tmpDir }, tar);
|
||||
runProgram("tar", true, { "-x", "-f", "-", "-C", tmpDir }, tar);
|
||||
|
||||
gitInfo.storePath = store->addToStore(name, tmpDir);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ cp dependencies.nix $tarroot/default.nix
|
|||
cp config.nix dependencies.builder*.sh $tarroot/
|
||||
|
||||
tarball=$TEST_ROOT/tarball.tar.xz
|
||||
(cd $TEST_ROOT && tar c tarball) | xz > $tarball
|
||||
(cd $TEST_ROOT && tar cf - tarball) | xz > $tarball
|
||||
|
||||
nix-env -f file://$tarball -qa --out-path | grep -q dependencies
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue