Merge pull request #257276 from fricklerhandwerk/dhall-nix-env

use `nix-shell -p` for `dhall-to-nixpkgs` example

authored by

Silvan Mosberger and committed by
GitHub
55e187e8 aae9566b

+6 -5
+6 -5
doc/languages-frameworks/dhall.section.md
··· 303 packaging Dhall code. For example: 304 305 ```ShellSession 306 - $ nix-env --install --attr haskellPackages.dhall-nixpkgs 307 - 308 - $ nix-env --install --attr nix-prefetch-git # Used by dhall-to-nixpkgs 309 - 310 - $ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git 311 { buildDhallGitHubPackage, Prelude }: 312 buildDhallGitHubPackage { 313 name = "dhall-semver"; ··· 324 dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ]; 325 } 326 ``` 327 328 The utility takes care of automatically detecting remote imports and converting 329 them to package dependencies. You can also use the utility on local
··· 303 packaging Dhall code. For example: 304 305 ```ShellSession 306 + $ nix-shell -p haskellPackages.dhall-nixpkgs nix-prefetch-git 307 + [nix-shell]$ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git 308 { buildDhallGitHubPackage, Prelude }: 309 buildDhallGitHubPackage { 310 name = "dhall-semver"; ··· 321 dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ]; 322 } 323 ``` 324 + 325 + :::{.note} 326 + `nix-prefetch-git` has to be in `$PATH` for `dhall-to-nixpkgs` to work. 327 + ::: 328 329 The utility takes care of automatically detecting remote imports and converting 330 them to package dependencies. You can also use the utility on local