3
0
Fork 0
forked from mirrors/nixpkgs

emptyFile, emptyDirectory: init

This commit is contained in:
Robert Hensing 2021-06-12 17:28:00 +02:00
parent 432fc2d9a6
commit 047fe2fe23

View file

@ -571,6 +571,22 @@ rec {
installPhase = "cp -R ./ $out";
};
/* An immutable file in the store with a length of 0 bytes. */
emptyFile = runCommand "empty-file" {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p";
preferLocalBuild = true;
} "touch $out";
/* An immutable empty directory in the store. */
emptyDirectory = runCommand "empty-directory" {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
preferLocalBuild = true;
} "mkdir $out";
/* Checks the command output contains the specified version
*
* Although simplistic, this test assures that the main program