Skip to content
Snippets Groups Projects
Commit e16a12da authored by Tom Prince's avatar Tom Prince
Browse files

Use a non-versioned filename for our nixpkgs pin.

parent 09adcab5
No related branches found
No related tags found
2 merge requests!264merge develop into production,!222Update nixos to 21.11
{ pkgs ? import ./nixpkgs-2105.nix { } }:
{ pkgs ? import ./nixpkgs.nix { } }:
{
# Render the project documentation source to some presentation format (ie,
# html) with Sphinx.
......
......@@ -17,7 +17,7 @@
# installed, as well as the NixOS module set that is used.
# This is intended to be used in a grid definition like:
# network = { ... ; inherit (gridlib) pkgs; ... }
pkgs = import ../../nixpkgs-2105.nix {
pkgs = import ../../nixpkgs.nix {
# Ensure that configuration of the system where this runs
# doesn't leak into what we build.
# See https://github.com/NixOS/nixpkgs/issues/62513
......
......@@ -72,14 +72,14 @@ EOF
ssh -o StrictHostKeyChecking=no "$(hostname).$(domainname)" ":"
# Set nixpkgs to our preferred version for the morph build. Annoyingly, we
# can't just use nixpkgs-2105.nix as our nixpkgs because some code (in morph,
# can't just use nixpkgs.nix as our nixpkgs because some code (in morph,
# at least) wants <nixpkgs> to be a fully-resolved path to a nixpkgs tree.
# For example, morph evaluated `import <nixpkgs/lib>` which would turn into
# something like `import nixpkgs-2105.nix/lib` which is nonsense.
# something like `import nixpkgs.nix/lib` which is nonsense.
#
# So instead, import our nixpkgs which forces it to be instantiated in the
# store, then ask for its path, then set NIX_PATH to that.
export NIX_PATH="nixpkgs=$(nix eval "(import ${CHECKOUT}/nixpkgs-2105.nix { }).path")"
export NIX_PATH="nixpkgs=$(nix eval "(import ${CHECKOUT}/nixpkgs.nix { }).path")"
# Attempt to update just this host. Choose the morph grid definition matching
# the grid we belong to and limit the morph deployment update to the host
......
{
"name": "release2105",
"name": "source",
"url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.4717.df123677560/nixexprs.tar.xz",
"sha256": "02zkhiwl3lwhk9fkmcbcfr927w135xdrgp6z7g804symbd1jcwal"
}
\ No newline at end of file
}
import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ./nixpkgs-2105.json)))
import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ./nixpkgs.json)))
let
release2105 = import ./nixpkgs-2105.nix { };
pinned-pkgs = import ./nixpkgs.nix { };
in
{ pkgs ? release2105, lib ? pkgs.lib, python ? pkgs.python3 }:
{ pkgs ? pinned-pkgs, lib ? pkgs.lib, python ? pkgs.python3 }:
let
tools = pkgs.callPackage ./tools {};
in
......@@ -10,7 +10,7 @@ pkgs.mkShell {
# first adds that path to the store, and then interpolates the store path
# into the string. We use `builtins.toString` to convert the path to a
# string without copying it to the store before interpolating. Either the
# path is already in the store (e.g. when `pkgs` is `release2105`) so we
# path is already in the store (e.g. when `pkgs` is `pinned-pkgs`) so we
# avoid making a second copy with a longer name, or the user passed in local
# path (e.g. a checkout of nixpkgs) and we point at it directly, rather than
# a snapshot of it.
......
......@@ -37,7 +37,7 @@ def main():
"repo_file",
metavar="repo-file",
nargs="?",
default=Path(__file__).parent.with_name("nixpkgs-2105.json"),
default=Path(__file__).parent.with_name("nixpkgs.json"),
type=Path,
help="JSON file with pinned configuration.",
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment