diff --git a/source/guides/recipes/dependency-management.md b/source/guides/recipes/dependency-management.md index ee40204..cac6f18 100644 --- a/source/guides/recipes/dependency-management.md +++ b/source/guides/recipes/dependency-management.md @@ -7,10 +7,10 @@ Nix expressions themselves can depend on remote sources, and there are multiple For more automation around handling remote sources, set up [niv](https://github.com/nmattia/niv/) in your project: ```shell-session -$ nix-shell -p niv --run "niv init --nixpkgs nixos/nixpkgs --nixpkgs-branch nixos-23.05" +$ nix-shell -p niv --run "niv init --nixpkgs nixos/nixpkgs --nixpkgs-branch nixos-23.11" ``` -This command will fetch the latest revision of the Nixpkgs 23.05 release branch. +This command will fetch the latest revision of the Nixpkgs 23.11 release branch. In the current directory it will generate `nix/sources.json`, which will contain a pinned reference to the obtained revision. It will also create `nix/sources.nix`, which exposes those dependencies as an attribute set. @@ -66,7 +66,7 @@ Enter the development environment, create a new directory, and set up niv with a $ nix-shell [nix-shell]$ mkdir old [nix-shell]$ cd old -[nix-shell]$ niv init --nixpkgs nixos/nixpkgs --nixpkgs-branch 18.09 +[nix-shell]$ niv init --nixpkgs nixos/nixpkgs --nixpkgs-branch 21.11 ``` Create a file `default.nix` in the new directory, and import the original one with the `sources` just created. diff --git a/source/guides/recipes/direnv.md b/source/guides/recipes/direnv.md index aab64df..63c6ba0 100644 --- a/source/guides/recipes/direnv.md +++ b/source/guides/recipes/direnv.md @@ -10,7 +10,7 @@ For example, write a `shell.nix` with the following contents: ```nix let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; in @@ -19,8 +19,8 @@ pkgs.mkShellNoCC { hello ]; } - ``` + From the top-level directory of your project run: ```shell-session @@ -41,7 +41,7 @@ Make the following addition: ```diff let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; in diff --git a/source/guides/recipes/python-environment.md b/source/guides/recipes/python-environment.md index 87bd260..7bd9c13 100644 --- a/source/guides/recipes/python-environment.md +++ b/source/guides/recipes/python-environment.md @@ -31,7 +31,7 @@ This is a simple Flask application which serves a JSON document with the message Create a new file `shell.nix` to declare the development environment: ```{code-block} nix shell.nix -{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11") {} }: +{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11") {} }: pkgs.mkShellNoCC { packages = with pkgs; [ diff --git a/source/guides/recipes/sharing-dependencies.md b/source/guides/recipes/sharing-dependencies.md index 4d44af2..099e530 100644 --- a/source/guides/recipes/sharing-dependencies.md +++ b/source/guides/recipes/sharing-dependencies.md @@ -49,7 +49,7 @@ Further assume your project is defined in `default.nix`: ```nix # default.nix let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; in { @@ -62,7 +62,7 @@ Add an attribute to `default.nix` specifying an environment: ```diff let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; in { @@ -77,7 +77,7 @@ Then take the package's dependencies into the environment with [`inputsFrom`](ht ```diff let - nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-22.11"; + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; pkgs = import nixpkgs { config = {}; overlays = []; }; + build = pkgs.callPackage ./build.nix {}; in