You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB
Nix

# 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 pkgs attribute if
# desired, probably in the context of hydra.
let
_pkgs = import <nixpkgs> {};
_nixpkgs = _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ./pkgs/nixpkgs.json);
in
{ pkgs ? import _nixpkgs {}
, geckoSrc ? null
, servoSrc ? null
}:
let
callPackage = (extra: pkgs.lib.callPackageWith
({ inherit geckoSrc servoSrc; } // self // extra)) {};
self = {
lib = callPackage ./pkgs/lib/default.nix { };
rustPlatform = pkgs.rustUnstable;
pkgs = pkgs // {
name = "nixpkgs";
updateScript = self.lib.updateFromGitHub {
owner = "NixOS";
repo = "nixpkgs-channels";
branch = "nixos-unstable-small";
path = "pkgs/nixpkgs.json";
};
};
gecko = callPackage ./pkgs/gecko { };
servo = callPackage ./pkgs/servo { };
firefox-nightly-bin = _pkgs.lowPrio (callPackage ./pkgs/firefox-nightly-bin/default.nix { });
VidyoDesktop = callPackage ./pkgs/VidyoDesktop { };
};
in self