mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 14:32:43 -04:00
Merge pull request #64 from DamienCassou/stop-using-anti-patterns
Stop using anti patterns
This commit is contained in:
commit
4d89d507ec
|
@ -35,8 +35,8 @@ Examples
|
||||||
- ``NIX_PATH=nixpkgs=http://nixos.org/channels/nixos-20.03/nixexprs.tar.xz nix-build ...``
|
- ``NIX_PATH=nixpkgs=http://nixos.org/channels/nixos-20.03/nixexprs.tar.xz nix-build ...``
|
||||||
- Using just Nix::
|
- Using just Nix::
|
||||||
|
|
||||||
with import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-20.03.tar.gz) {};
|
let
|
||||||
|
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-20.03.tar.gz") {};
|
||||||
stdenv.mkDerivation { … }
|
in pkgs.stdenv.mkDerivation { … }
|
||||||
|
|
||||||
- To make ad-hoc environment available on NixOS: ``nix.nixPath = [ ("nixpkgs=" + toString pkgs.path) ];``
|
- To make ad-hoc environment available on NixOS: ``nix.nixPath = [ ("nixpkgs=" + toString pkgs.path) ];``
|
||||||
|
|
|
@ -32,7 +32,7 @@ The simplest way to do this is to fetch the required nixpkgs version as a tarbal
|
||||||
|
|
||||||
.. code:: nix
|
.. code:: nix
|
||||||
|
|
||||||
{ pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz) {};
|
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz") {};
|
||||||
}:
|
}:
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue