mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
tests: test nix search behavior
This commit is contained in:
parent
9432f3fb7d
commit
8282c60d74
3 changed files with 69 additions and 1 deletions
25
tests/search.nix
Normal file
25
tests/search.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
with import ./config.nix;
|
||||
|
||||
{
|
||||
hello = mkDerivation rec {
|
||||
name = "hello-${version}";
|
||||
version = "0.1";
|
||||
buildCommand = "touch $out";
|
||||
meta.description = "Empty file";
|
||||
};
|
||||
foo = mkDerivation rec {
|
||||
name = "foo-5";
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
echo ${name} > $out/${name}
|
||||
'';
|
||||
};
|
||||
bar = mkDerivation rec {
|
||||
name = "bar-3";
|
||||
buildCommand = ''
|
||||
echo "Does not build successfully"
|
||||
exit 1
|
||||
'';
|
||||
meta.description = "broken bar";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue