2 , localSystem ? { system = args.system or builtins.currentSystem; }
3 , system ? localSystem.system
4 , crossSystem ? localSystem
9 # nix-build build.nix --argstr maintainer <yourname>
11 # to build for aarch64-linux using boot.binfmt.emulatedSystems:
12 # nix-build build.nix --argstr maintainer <yourname> --argstr system aarch64-linux
15 pkgs = import ./../../default.nix (removeAttrs args [ "maintainer" ]);
16 maintainer_ = pkgs.lib.maintainers.${maintainer};
17 packagesWith = cond: return: set:
19 (pkgs.lib.mapAttrsToList
22 result = builtins.tryEval
24 if pkgs.lib.isDerivation pkg && cond name pkg then
25 # Skip packages whose closure fails on evaluation.
26 # This happens for pkgs like `python27Packages.djangoql`
27 # that have disabled Python pkgs as dependencies.
28 builtins.seq pkg.outPath
30 else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false
31 then packagesWith cond return pkg
35 if result.success then result.value
45 if builtins.hasAttr "meta" pkg && builtins.hasAttr "maintainers" pkg.meta
47 if builtins.isList pkg.meta.maintainers
48 then builtins.elem maintainer_ pkg.meta.maintainers
49 else maintainer_ == pkg.meta.maintainers