Jump to content

FAQ/Pinning Nixpkgs: Difference between revisions

nixpkgs-channels -> nixpkgs
imported>Valodim
m (quote naked uris)
imported>Ryantm
(nixpkgs-channels -> nixpkgs)
Line 25: Line 25:
   # Descriptive name to make the store path easier to identify
   # Descriptive name to make the store path easier to identify
   name = "nixos-unstable-2018-09-12";
   name = "nixos-unstable-2018-09-12";
   url = "https://github.com/nixos/nixpkgs-channels/";
   url = "https://github.com/nixos/nixpkgs/";
   # Commit hash for nixos-unstable as of 2018-09-12
   # Commit hash for nixos-unstable as of 2018-09-12
   # `git ls-remote https://github.com/nixos/nixpkgs-channels nixos-unstable`
   # `git ls-remote https://github.com/nixos/nixpkgs nixos-unstable`
   ref = "refs/heads/nixos-unstable";
   ref = "refs/heads/nixos-unstable";
   rev = "ca2ba44cab47767c8127d1c8633e2b581644eb8f";
   rev = "ca2ba44cab47767c8127d1c8633e2b581644eb8f";
Line 61: Line 61:
   pinnedPkgs = hostPkgs.fetchFromGitHub {
   pinnedPkgs = hostPkgs.fetchFromGitHub {
     owner = "NixOS";
     owner = "NixOS";
     repo = "nixpkgs-channels";
     repo = "nixpkgs";
     # nixos-unstable as of 2017-11-13T08:53:10-00:00
     # nixos-unstable as of 2017-11-13T08:53:10-00:00
     rev = "ac355040656de04f59406ba2380a96f4124ebdad";
     rev = "ac355040656de04f59406ba2380a96f4124ebdad";
Line 81: Line 81:
$ nix-shell -p nix-prefetch-git
$ nix-shell -p nix-prefetch-git
   
   
[nix-shell:~]$ nix-prefetch-git https://github.com/nixos/nixpkgs-channels.git refs/heads/nixos-unstable > nixpkgs-version.json
[nix-shell:~]$ nix-prefetch-git https://github.com/nixos/nixpkgs.git refs/heads/nixos-unstable > nixpkgs-version.json
   
   
...
...
Line 87: Line 87:
[nix-shell:~]$ cat nixpkgs-version.json
[nix-shell:~]$ cat nixpkgs-version.json
{
{
   "url": "https://github.com/nixos/nixpkgs-channels.git",
   "url": "https://github.com/nixos/nixpkgs.git",
   "rev": "f607771d0f5e4fa905afff1c772febd9f3103e1a",
   "rev": "f607771d0f5e4fa905afff1c772febd9f3103e1a",
   "date": "2018-01-09T11:18:25-05:00",
   "date": "2018-01-09T11:18:25-05:00",
Line 103: Line 103:
   pinnedPkgs = hostPkgs.fetchFromGitHub {
   pinnedPkgs = hostPkgs.fetchFromGitHub {
     owner = "NixOS";
     owner = "NixOS";
     repo = "nixpkgs-channels";
     repo = "nixpkgs";
     inherit (pinnedVersion) rev sha256;
     inherit (pinnedVersion) rev sha256;
   };
   };
Line 121: Line 121:
   pinnedPkgs = hostPkgs.fetchFromGitHub {
   pinnedPkgs = hostPkgs.fetchFromGitHub {
     owner = "NixOS";
     owner = "NixOS";
     repo = "nixpkgs-channels";
     repo = "nixpkgs";
     inherit (pinnedVersion) rev sha256;
     inherit (pinnedVersion) rev sha256;
   };
   };
Anonymous user