at master 1.3 kB view raw
1# A shell to get tooling for Nixpkgs development 2# 3# Note: We intentionally don't use Flakes here, 4# because every time you change any file and do another `nix develop`, 5# it would create another copy of the entire ~500MB tree in the store. 6# See https://github.com/NixOS/nix/pull/6530 for the future 7# 8# Note: We use a pinned Nixpkgs so that the tools are readily available even 9# when making changes that would otherwise require a new build of those tools. 10# If you'd like to test out changes to the tools themselves, you can pass 11# 12# nix-shell --arg nixpkgs ./. 13# 14{ 15 system ? builtins.currentSystem, 16 nixpkgs ? null, 17}: 18let 19 inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt; 20 21 # For `nix-shell -A hello` 22 curPkgs = builtins.removeAttrs (import ./. { inherit system; }) [ 23 # Although this is what anyone may expect from a `_type = "pkgs"`, 24 # this file is intended to produce a shell in the first place, 25 # and a `_type` tag could confuse some code. 26 "_type" 27 ]; 28in 29curPkgs 30// pkgs.mkShellNoCC { 31 inputsFrom = [ 32 fmt.shell 33 ]; 34 packages = with pkgs; [ 35 # Helper to review Nixpkgs PRs 36 # See CONTRIBUTING.md 37 nixpkgs-review 38 # Command-line utility for working with GitHub 39 # Used by nixpkgs-review to fetch eval results 40 gh 41 ]; 42}