diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-04-22T11·37+0200 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2018-04-22T11·37+0200 |
commit | 605b455c9324b4d050a55c4827aa3192a87dbbe7 (patch) | |
tree | 3b7d6c7773fa0835813d63dce68e69a8f4e2f4fc /packages.nix | |
parent | 7c581e4f645630d097af65043bcf694852cb1bb3 (diff) |
refactor(packages): Pin unstable using builtins.fetchTarball
This is fetched at evaluation time and removes the dependency on first having some packages in scope.
Diffstat (limited to 'packages.nix')
-rw-r--r-- | packages.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packages.nix b/packages.nix index fe85f82dba1f..c2d5a133da4b 100644 --- a/packages.nix +++ b/packages.nix @@ -5,18 +5,21 @@ { config, pkgs, ... }: let + fetchChannel = { rev, sha256 }: import (fetchTarball { + inherit sha256; + url = "https://github.com/NixOS/nixpkgs-channels/archive/${rev}.tar.gz"; + }) { config.allowUnfree = true; }; + # Channels last updated: 2014-04-22 # Certain packages from unstable are required in my daily setup. To # get access to them, they are hand-picked from the unstable channel # and set as overrides on the system package set. - unstable = import (pkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs-channels"; - rev = "6c064e6b1f34a8416f990db0cc617a7195f71588"; + unstable = fetchChannel { + rev = "6c064e6b1f34a8416f990db0cc617a7195f71588"; sha256 = "1rqzh475xn43phagrr30lb0fd292c1s8as53irihsnd5wcksnbyd"; - }) { config.allowUnfree = true; }; + }; in { # Configure the Nix package manager nixpkgs = { |