Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created October 2, 2017 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilpner/041a864d681f0fc30787bd38b19d4cf1 to your computer and use it in GitHub Desktop.
Save tilpner/041a864d681f0fc30787bd38b19d4cf1 to your computer and use it in GitHub Desktop.
_: _: import ../nixpkgs
with builtins;
let
readDirAbsolute = dir: map (e: dir + ("/" + e)) (attrNames (readDir dir));
config = {
allowUnfree = true;
useSandbox = true;
};
overlays = map (o: import o) (readDirAbsolute ../overlays);
srcs = fromJSON (readFile ./srcs.json);
bootstrapSrc = fetchTarball srcs.bootstrap;
bootstrapPkgs = import bootstrapSrc {};
sources = rec {
bootstrap = bootstrapSrc;
github = bootstrapPkgs.lib.mapAttrs (k: v: bootstrapPkgs.fetchFromGitHub v) srcs.github;
inherit (github) stable unstable;
};
in rec {
inherit sources readDirAbsolute;
bootstrap = bootstrapPkgs;
# branch nixos-17.09
stable = import sources.stable { inherit config overlays; };
# branch nixos-unstable
unstable = import sources.unstable { inherit config overlays; };
}
{
"bootstrap": {
"url": "https://github.com/nixos/nixpkgs/archive/9e5a13f6f1418700c9747da8dbbbff51d11c8dc0.tar.gz",
"sha256": "0a6i79xl3y0j9w8k3b5ggsfkjskmia8sgasrdhrr83fbdk7f24b1"
},
"github": {
"stable": {
"owner": "nixos",
"repo": "nixpkgs-channels",
"rev": "dc4750b3c3fb25762297f3262b14ce1cb666500f",
"sha256": "13lgc9yxjqvddigdnsaxryv7g3sxgfadja2iif6chah8i4r1qbxk"
},
"unstable": {
"owner": "nixos",
"repo": "nixpkgs-channels",
"rev": "9824ca6975fcbf5a2da9e6ba98dacafaa12bb1b3",
"sha256": "1pnawigah94mpinkbdak6b5ncabkhg9a4wnq6n2kmvzqycnnp5bp"
},
"riot-electron-nix": {
"owner": "ralith",
"repo": "riot-electron-nix",
"rev": "ec1f0e61ee6822791e57b91b679e93d2c38ec56c",
"sha256": "0mnvh88cvygwvirijmva60jxc9yqdmnm65ba563n7djycj2afvrv",
"fetchSubmodules": true
},
"nixpkgs-mozilla": {
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "7e54fb37cd177e6d83e4e2b7d3e3b03bd6de0e0f",
"sha256": "1shz56l19kgk05p2xvhb7jg1whhfjix6njx1q4rvrc5p1lvyvizd",
"fetchSubmodules": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment