refactor(packages): Pin unstable using builtins.fetchTarball
This is fetched at evaluation time and removes the dependency on first having some packages in scope.
This commit is contained in:
		
							parent
							
								
									7c581e4f64
								
							
						
					
					
						commit
						605b455c93
					
				
					 1 changed files with 8 additions and 5 deletions
				
			
		
							
								
								
									
										13
									
								
								packages.nix
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								packages.nix
									
										
									
									
									
								
							| 
						 | 
					@ -5,18 +5,21 @@
 | 
				
			||||||
{ config, pkgs, ... }:
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let
 | 
					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
 | 
					  # Channels last updated: 2014-04-22
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Certain packages from unstable are required in my daily setup. To
 | 
					  # Certain packages from unstable are required in my daily setup. To
 | 
				
			||||||
  # get access to them, they are hand-picked from the unstable channel
 | 
					  # get access to them, they are hand-picked from the unstable channel
 | 
				
			||||||
  # and set as overrides on the system package set.
 | 
					  # and set as overrides on the system package set.
 | 
				
			||||||
  unstable = import (pkgs.fetchFromGitHub {
 | 
					  unstable = fetchChannel {
 | 
				
			||||||
    owner  = "NixOS";
 | 
					    rev = "6c064e6b1f34a8416f990db0cc617a7195f71588";
 | 
				
			||||||
    repo   = "nixpkgs-channels";
 | 
					 | 
				
			||||||
    rev    = "6c064e6b1f34a8416f990db0cc617a7195f71588";
 | 
					 | 
				
			||||||
    sha256 = "1rqzh475xn43phagrr30lb0fd292c1s8as53irihsnd5wcksnbyd";
 | 
					    sha256 = "1rqzh475xn43phagrr30lb0fd292c1s8as53irihsnd5wcksnbyd";
 | 
				
			||||||
  }) { config.allowUnfree = true; };
 | 
					  };
 | 
				
			||||||
in {
 | 
					in {
 | 
				
			||||||
  # Configure the Nix package manager
 | 
					  # Configure the Nix package manager
 | 
				
			||||||
  nixpkgs = {
 | 
					  nixpkgs = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue