mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 14:32:43 -04:00
Update example pinned nixpkgs to a recent one
The pinned nixpkgs in these examples does not work with more recent versions of nix. Fixes #419
This commit is contained in:
parent
aeaf6a3cd9
commit
3264e91e74
|
@ -29,7 +29,7 @@ Developer environments allow you to:
|
||||||
At the top-level of your project create `shell.nix` with the following contents:
|
At the top-level of your project create `shell.nix` with the following contents:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz") {} }:
|
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz") {} }:
|
||||||
|
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -78,7 +78,7 @@ You should see something similar to this:
|
||||||
Given the following `shell.nix`:
|
Given the following `shell.nix`:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz") {} }:
|
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz") {} }:
|
||||||
|
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -1456,7 +1456,7 @@ A fully reproducible example would therefore look like this:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
let
|
let
|
||||||
nixpkgs = fetchTarball https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz;
|
nixpkgs = fetchTarball https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz;
|
||||||
pkgs = import nixpkgs {};
|
pkgs = import nixpkgs {};
|
||||||
in
|
in
|
||||||
pkgs.lib.strings.toUpper "always pin your sources"
|
pkgs.lib.strings.toUpper "always pin your sources"
|
||||||
|
|
|
@ -22,7 +22,7 @@ To create **fully reproducible** Nix expressions, we can pin an exact version of
|
||||||
The simplest way to do this is to fetch the required Nixpkgs version as a tarball specified via the relevant Git commit hash:
|
The simplest way to do this is to fetch the required Nixpkgs version as a tarball specified via the relevant Git commit hash:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz") {}
|
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz") {}
|
||||||
}:
|
}:
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue