summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2023-09-25 17:00:55 +0200
committerfricklerhandwerk <valentin@fricklerhandwerk.de>2023-09-25 17:00:55 +0200
commitfba19509b1ebed5a341494d9e501cc4cf7a7fb59 (patch)
tree84ebc06f881ce46672e5860d404b83fa5c4b0209 /doc/languages-frameworks
parent370097ce864f731c6e281ab3970cef1b39dfa06f (diff)
downloadnixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar.gz
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar.bz2
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar.lz
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar.xz
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.tar.zst
nixpkgs-fba19509b1ebed5a341494d9e501cc4cf7a7fb59.zip
use `nix-shell -p` for `dhall-to-nixpkgs` example
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/dhall.section.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/languages-frameworks/dhall.section.md b/doc/languages-frameworks/dhall.section.md
index 1a209dbc068..7322a61687d 100644
--- a/doc/languages-frameworks/dhall.section.md
+++ b/doc/languages-frameworks/dhall.section.md
@@ -303,11 +303,8 @@ You can use the `dhall-to-nixpkgs` command-line utility to automate
 packaging Dhall code.  For example:
 
 ```ShellSession
-$ nix-env --install --attr haskellPackages.dhall-nixpkgs
-
-$ nix-env --install --attr nix-prefetch-git  # Used by dhall-to-nixpkgs
-
-$ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git
+$ nix-shell -p haskellPackages.dhall-nixpkgs nix-prefetch-git
+[nix-shell]$ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git
 { buildDhallGitHubPackage, Prelude }:
   buildDhallGitHubPackage {
     name = "dhall-semver";
@@ -325,6 +322,10 @@ $ dhall-to-nixpkgs github https://github.com/Gabriella439/dhall-semver.git
     }
 ```
 
+:::{.note}
+`nix-prefetch-git` has to be in `$PATH` for `dhall-to-nixpkgs` to work.
+:::
+
 The utility takes care of automatically detecting remote imports and converting
 them to package dependencies.  You can also use the utility on local
 Dhall directories, too: