diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 10:57:40 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 10:57:40 +0200 |
commit | 61e3d598b67290ca66f34fcac7b7373f506240da (patch) | |
tree | 317c6601af878982b211ab514a7abf801aca1ec3 | |
parent | 01572c2198de49071827f0be9f5db202bac21703 (diff) |
Rename 'nix dev-shell' to 'nix develop'
Fixes #3648.
-rw-r--r-- | src/nix/develop.cc (renamed from src/nix/dev-shell.cc) | 14 | ||||
-rw-r--r-- | src/nix/local.mk | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/nix/dev-shell.cc b/src/nix/develop.cc index d300f6a23..3045d7dc3 100644 --- a/src/nix/dev-shell.cc +++ b/src/nix/develop.cc @@ -110,7 +110,7 @@ StorePath getDerivationEnvironment(ref<Store> store, const StorePath & drvPath) auto builder = baseNameOf(drv.builder); if (builder != "bash") - throw Error("'nix dev-shell' only works on derivations that use 'bash' as their builder"); + throw Error("'nix develop' only works on derivations that use 'bash' as their builder"); auto getEnvShPath = store->addTextToStore("get-env.sh", getEnvSh, {}); @@ -231,11 +231,11 @@ struct Common : InstallableCommand, MixProfile } }; -struct CmdDevShell : Common, MixEnvironment +struct CmdDevelop : Common, MixEnvironment { std::vector<std::string> command; - CmdDevShell() + CmdDevelop() { addFlag({ .longName = "command", @@ -259,15 +259,15 @@ struct CmdDevShell : Common, MixEnvironment return { Example{ "To get the build environment of GNU hello:", - "nix dev-shell nixpkgs.hello" + "nix develop nixpkgs.hello" }, Example{ "To store the build environment in a profile:", - "nix dev-shell --profile /tmp/my-shell nixpkgs.hello" + "nix develop --profile /tmp/my-shell nixpkgs.hello" }, Example{ "To use a build environment previously recorded in a profile:", - "nix dev-shell /tmp/my-shell" + "nix develop /tmp/my-shell" }, }; } @@ -341,4 +341,4 @@ struct CmdPrintDevEnv : Common }; static auto r1 = registerCommand<CmdPrintDevEnv>("print-dev-env"); -static auto r2 = registerCommand<CmdDevShell>("dev-shell"); +static auto r2 = registerCommand<CmdDevelop>("develop"); diff --git a/src/nix/local.mk b/src/nix/local.mk index 8c0eed19e..43b7754e3 100644 --- a/src/nix/local.mk +++ b/src/nix/local.mk @@ -28,4 +28,4 @@ $(eval $(call install-symlink, $(bindir)/nix, $(libexecdir)/nix/build-remote)) src/nix-env/user-env.cc: src/nix-env/buildenv.nix.gen.hh -src/nix/dev-shell.cc: src/nix/get-env.sh.gen.hh +src/nix/develop.cc: src/nix/get-env.sh.gen.hh |