diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 16:24:38 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 16:24:41 +0000 |
commit | c4b52f54d926974fdba1499c37713c8b8a01b8ae (patch) | |
tree | e508301d2a9cbd17a4540a74efe3515f5574dc1f /nixpkgs-overlays/nixpkgs-mozilla/pinned.nix | |
parent | 8c0790eb6095ef59a9623596f5794d250b95c699 (diff) | |
parent | 68bb2d2ae21ea73392f81f436e89577997fa8db4 (diff) | |
download | nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar.gz nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar.bz2 nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar.lz nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar.xz nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.tar.zst nixlib-c4b52f54d926974fdba1499c37713c8b8a01b8ae.zip |
Add 'nixpkgs-overlays/nixpkgs-mozilla/' from commit '68bb2d2ae21ea73392f81f436e89577997fa8db4'
git-subtree-dir: nixpkgs-overlays/nixpkgs-mozilla git-subtree-mainline: 8c0790eb6095ef59a9623596f5794d250b95c699 git-subtree-split: 68bb2d2ae21ea73392f81f436e89577997fa8db4
Diffstat (limited to 'nixpkgs-overlays/nixpkgs-mozilla/pinned.nix')
-rw-r--r-- | nixpkgs-overlays/nixpkgs-mozilla/pinned.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs-overlays/nixpkgs-mozilla/pinned.nix b/nixpkgs-overlays/nixpkgs-mozilla/pinned.nix new file mode 100644 index 000000000000..1499d40ea7c6 --- /dev/null +++ b/nixpkgs-overlays/nixpkgs-mozilla/pinned.nix @@ -0,0 +1,36 @@ +# This script extends nixpkgs with mozilla packages. +# +# First it imports the <nixpkgs> in the environment and depends on it +# providing fetchFromGitHub and lib.importJSON. +# +# After that it loads a pinned release of nixos-unstable and uses that as the +# base for the rest of packaging. One can pass it's own pkgsPath attribute if +# desired, probably in the context of hydra. + +{ pkgsPath ? null +, overlays ? [] +, system ? null +, geckoSrc ? null +}: + +# Pin a specific version of Nixpkgs. +let + _pkgs = import <nixpkgs> {}; + _pkgsPath = + if pkgsPath != null then pkgsPath + else _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ./pkgs/nixpkgs.json); + nixpkgs = import _pkgsPath ({ + overlays = import ./default.nix ++ overlays; + } // (if system != null then { inherit system; } else {})); +in + nixpkgs // { + # Do not add a name attribute attribute in an overlay !!! As this will cause + # tons of recompilations. + name = "nixpkgs"; + updateScript = nixpkgs.lib.updateFromGitHub { + owner = "NixOS"; + repo = "nixpkgs-channels"; + branch = "nixos-unstable-small"; + path = "pkgs/nixpkgs.json"; + }; + } |