···45## `runCommand` {#trivial-builder-runCommand}
67-This takes three arguments, `name`, `env`, and `buildCommand`. `name` is just the name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute. `env` is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped `stdenv.mkDerivation`. `buildCommand` specifies the commands that will be run to create this derivation. Note that you will need to create `$out` for Nix to register the command as successful.
0089-An example of using `runCommand` is provided below.
000000000000001011```nix
12(import <nixpkgs> {}).runCommand "my-example" {} ''
···28 date
29''
30```
03132## `runCommandCC` {#trivial-builder-runCommandCC}
33
···45## `runCommand` {#trivial-builder-runCommand}
67+`runCommand :: String -> AttrSet -> String -> Derivation`
8+9+`runCommand name drvAttrs buildCommand` returns a derivation that is built by running the specified shell commands.
1011+`name :: String`
12+: The name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute.
13+14+`drvAttr :: AttrSet`
15+: Attributes to pass to the underlying call to [`stdenv.mkDerivation`](#chap-stdenv).
16+17+`buildCommand :: String`
18+: Shell commands to run in the derivation builder.
19+20+ ::: {.note}
21+ You have to create a file or directory `$out` for Nix to be able to run the builder successfully.
22+ :::
23+24+::: {.example #ex-runcommand-simple}
25+# Invocation of `runCommand`
2627```nix
28(import <nixpkgs> {}).runCommand "my-example" {} ''
···44 date
45''
46```
47+:::
4849## `runCommandCC` {#trivial-builder-runCommandCC}
50