SHARE
TWEET

Untitled

a guest Sep 11th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let
  2.     # [CommentDb: 2]
  3.     nixpkgsTarball = {
  4.         "18.09"  = fetchTarball https://nixos.org/channels/nixos-18.09/nixexprs.tar.xz;
  5.         unstable = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
  6.         master   = fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz;
  7.     };
  8.     tarball_18_09 = fetchTarball https://nixos.org/channels/nixos-18.09/nixexprs.tar.xz;
  9.  
  10.     tarball_unstable = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
  11.  
  12.     # Github master
  13.     tarball_master  = fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz;
  14. in
  15.  
  16. ...
  17. ...
  18. ...
  19.  
  20.         nixpkgs.config = {
  21.             allowUnfree = true;
  22.             packageOverrides = pkgs: {
  23.                 unstable = import tarball_unstable {
  24.                     config = config.nixpkgs.config;
  25.                 };
  26.  
  27.  
  28.                 # This doesn't work
  29.                 archived = builtins.listToAttrs
  30.                 (
  31.                     lib.attrsets.mapAttrsToList
  32.                     (
  33.                         name: value:
  34.                         {
  35.                             name = name;
  36.                             value = import (nixpkgsTarball.${value}){
  37.                                 config = config.nixpkgs.config;
  38.                             };
  39.                         }
  40.                     )
  41.                     nixpkgsTarball
  42.                 );
  43.             };
  44.         };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top