Skip to content
Snippets Groups Projects
Commit fa1d6f4b authored by Jens Nolte's avatar Jens Nolte
Browse files

Improve channel infrstructure and update channels

parent ae063c8b
No related branches found
No related tags found
No related merge requests found
{ {
"ref": "refs/heads/nixos-19.09",
"url": "https://github.com/NixOS/nixpkgs-channels/", "url": "https://github.com/NixOS/nixpkgs-channels/",
"rev": "093faad9684796975520d9d88503e76ab539b8ef", "rev": "ac218438bdb911f746da1ffcb70c16dddf60dc4f",
"date": "2019-12-03T20:28:01-05:00", "date": "2020-01-08T14:25:34+00:00",
"sha256": "0v3an5f5anvqqfpihp9sgrhnzv68qvjihq16mjhfycglsz758z6p", "sha256": "0cbx6ln0ba11fmdhd64kzb62ggis19klbgpb3px04gbmvqx4nl1g",
"fetchSubmodules": false "fetchSubmodules": false
} }
name:
with builtins; with builtins;
let let
...@@ -5,7 +7,6 @@ let ...@@ -5,7 +7,6 @@ let
channelDef = fromJSON ( readFile ./channel.json ); channelDef = fromJSON ( readFile ./channel.json );
in fetchGit { in fetchGit {
name = "nixpkgs-19.09"; inherit name;
ref = "nixos-19.09"; inherit (channelDef) url rev ref;
inherit (channelDef) url rev;
} }
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i sh -p nix-prefetch-git #! nix-shell -i sh -p nix-prefetch-git jq
nix-prefetch-git --rev refs/heads/nixos-19.09 --no-deepClone https://github.com/NixOS/nixpkgs-channels/ > channel.json url="https://github.com/NixOS/nixpkgs-channels/"
ref="refs/heads/nixos-19.09"
nix-prefetch-git --rev "$ref" --no-deepClone "$url" | jq --arg ref "$ref" '{ref: $ref} + .' > channel.json
{ {
"ref": "refs/heads/nixos-unstable",
"url": "https://github.com/NixOS/nixpkgs-channels/", "url": "https://github.com/NixOS/nixpkgs-channels/",
"rev": "e89b21504f3e61e535229afa0b121defb52d2a50", "rev": "9beb0d1ac2ebd6063efbdc4d3631f8ce137bbf90",
"date": "2019-11-19T07:59:43-05:00", "date": "2020-01-06T05:49:56-05:00",
"sha256": "0jqcv3rfki3mwda00g66d27k6q2y7ca5mslrnshfpbdm7j8ya0kj", "sha256": "1v95779di35qhrz70p2v27kmwm09h8pgh74i1wc72v0zp3bdrf50",
"fetchSubmodules": false "fetchSubmodules": false
} }
name:
with builtins; with builtins;
let let
...@@ -5,7 +7,6 @@ let ...@@ -5,7 +7,6 @@ let
channelDef = fromJSON ( readFile ./channel.json ); channelDef = fromJSON ( readFile ./channel.json );
in fetchGit { in fetchGit {
name = "nixpkgs-unstable"; inherit name;
ref = "nixos-unstable"; inherit (channelDef) url rev ref;
inherit (channelDef) url rev;
} }
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i sh -p nix-prefetch-git #! nix-shell -i sh -p nix-prefetch-git jq
url="https://github.com/NixOS/nixpkgs-channels/"
ref="refs/heads/nixos-19.09"
nix-prefetch-git --rev "$ref" --no-deepClone "$url" | jq --arg ref "$ref" '{ref: $ref} + .' > channel.json
nix-prefetch-git --rev refs/heads/nixos-unstable --no-deepClone https://github.com/NixOS/nixpkgs-channels/ > channel.json
...@@ -13,7 +13,7 @@ let ...@@ -13,7 +13,7 @@ let
# channelsDir :: path # channelsDir :: path
channelsDir = ./channels; channelsDir = ./channels;
# allChannels :: { *: path } # allChannels :: { *: path }
allChannels = with helpers; keysToAttrs (channelname: import (channelsDir + "/${channelname}")) (readFilterDir (filterAnd [(not filterDirHidden) filterDirDirs]) channelsDir); allChannels = with helpers; keysToAttrs (channelname: import (channelsDir + "/${channelname}") channelname) (readFilterDir (filterAnd [(not filterDirHidden) filterDirDirs]) channelsDir);
# getMachineChannel :: string -> path # getMachineChannel :: string -> path
getMachineChannel = { name, path }: getMachineChannel = { name, path }:
let let
......
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