New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split all-packages.nix #10307
Closed
Closed
Split all-packages.nix #10307
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
pkgs: with pkgs; | ||
|
||
### Deprecated aliases - for backward compatibility | ||
|
||
rec { | ||
adobeReader = adobe-reader; | ||
arduino_core = arduino-core; # added 2015-02-04 | ||
asciidocFull = asciidoc-full; # added 2014-06-22 | ||
bridge_utils = bridge-utils; # added 2015-02-20 | ||
buildbotSlave = buildbot-slave; # added 2014-12-09 | ||
cheetahTemplate = pythonPackages.cheetah; # 2015-06-15 | ||
clangAnalyzer = clang-analyzer; # added 2015-02-20 | ||
cool-old-term = cool-retro-term; # added 2015-01-31 | ||
cv = progress; # added 2015-09-06 | ||
enblendenfuse = enblend-enfuse; # 2015-09-30 | ||
exfat-utils = exfat; # 2015-09-11 | ||
firefoxWrapper = firefox-wrapper; | ||
fuse_exfat = exfat; # 2015-09-11 | ||
haskell-ng = haskell; # 2015-04-19 | ||
haskellngPackages = haskellPackages; # 2015-04-19 | ||
htmlTidy = html-tidy; # added 2014-12-06 | ||
inherit (haskell.compiler) jhc uhc; # 2015-05-15 | ||
inotifyTools = inotify-tools; | ||
jquery_ui = jquery-ui; # added 2014-09-07 | ||
libtidy = html-tidy; # added 2014-12-21 | ||
lttngTools = lttng-tools; # added 2014-07-31 | ||
lttngUst = lttng-ust; # added 2014-07-31 | ||
nfsUtils = nfs-utils; # added 2014-12-06 | ||
quassel_qt5 = kf5Packages.quassel_qt5; # added 2015-09-30 | ||
quasselClient_qt5 = kf5Packages.quasselClient_qt5; # added 2015-09-30 | ||
quasselDaemon_qt5 = kf5Packages.quasselDaemon; # added 2015-09-30 | ||
quassel_kf5 = kf5Packages.quassel; # added 2015-09-30 | ||
quasselClient_kf5 = kf5Packages.quasselClient; # added 2015-09-30 | ||
rdiff_backup = rdiff-backup; # added 2014-11-23 | ||
rssglx = rss-glx; #added 2015-03-25 | ||
rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02 | ||
speedtest_cli = speedtest-cli; # added 2015-02-17 | ||
sqliteInteractive = sqlite-interactive; # added 2014-12-06 | ||
x11 = xlibsWrapper; # added 2015-09 | ||
xf86_video_nouveau = xorg.xf86videonouveau; # added 2015-09 | ||
xlibs = xorg; # added 2015-09 | ||
youtube-dl = pythonPackages.youtube-dl; # added 2015-06-07 | ||
youtubeDL = youtube-dl; # added 2014-10-26 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
/* This file composes the Nix Packages collection. That is, it | ||
imports the functions that build the various packages, and calls | ||
them with appropriate arguments. The result is a set of all the | ||
packages in the Nix Packages collection for some particular | ||
platform. */ | ||
|
||
|
||
{ # The system (e.g., `i686-linux') for which to build the packages. | ||
system ? builtins.currentSystem | ||
|
||
, # The standard environment to use. Only used for bootstrapping. If | ||
# null, the default standard environment is used. | ||
bootStdenv ? null | ||
|
||
, # Non-GNU/Linux OSes are currently "impure" platforms, with their libc | ||
# outside of the store. Thus, GCC, GFortran, & co. must always look for | ||
# files in standard system directories (/usr/include, etc.) | ||
noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd" | ||
&& system != "x86_64-kfreebsd-gnu") | ||
|
||
# More flags for the bootstrapping of stdenv. | ||
, gccWithCC ? true | ||
, gccWithProfiling ? true | ||
|
||
, # Allow a configuration attribute set to be passed in as an | ||
# argument. Otherwise, it's read from $NIXPKGS_CONFIG or | ||
# ~/.nixpkgs/config.nix. | ||
config ? null | ||
|
||
, crossSystem ? null | ||
, platform ? null | ||
}: | ||
|
||
|
||
let config_ = config; platform_ = platform; in # rename the function arguments | ||
|
||
let | ||
|
||
lib = import ../../lib; | ||
|
||
# The contents of the configuration file found at $NIXPKGS_CONFIG or | ||
# $HOME/.nixpkgs/config.nix. | ||
# for NIXOS (nixos-rebuild): use nixpkgs.config option | ||
config = | ||
let | ||
toPath = builtins.toPath; | ||
getEnv = x: if builtins ? getEnv then builtins.getEnv x else ""; | ||
pathExists = name: | ||
builtins ? pathExists && builtins.pathExists (toPath name); | ||
|
||
configFile = getEnv "NIXPKGS_CONFIG"; | ||
homeDir = getEnv "HOME"; | ||
configFile2 = homeDir + "/.nixpkgs/config.nix"; | ||
|
||
configExpr = | ||
if config_ != null then config_ | ||
else if configFile != "" && pathExists configFile then import (toPath configFile) | ||
else if homeDir != "" && pathExists configFile2 then import (toPath configFile2) | ||
else {}; | ||
|
||
in | ||
# allow both: | ||
# { /* the config */ } and | ||
# { pkgs, ... } : { /* the config */ } | ||
if builtins.isFunction configExpr | ||
then configExpr { inherit pkgs; } | ||
else configExpr; | ||
|
||
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc) | ||
|
||
platformAuto = let | ||
platforms = (import ./platforms.nix); | ||
in | ||
if system == "armv6l-linux" then platforms.raspberrypi | ||
else if system == "armv7l-linux" then platforms.armv7l-hf-multiplatform | ||
else if system == "armv5tel-linux" then platforms.sheevaplug | ||
else if system == "mips64el-linux" then platforms.fuloong2f_n32 | ||
else if system == "x86_64-linux" then platforms.pc64 | ||
else if system == "i686-linux" then platforms.pc32 | ||
else platforms.pcBase; | ||
|
||
platform = if platform_ != null then platform_ | ||
else config.platform or platformAuto; | ||
|
||
# Allow packages to be overriden globally via the `packageOverrides' | ||
# configuration option, which must be a function that takes `pkgs' | ||
# as an argument and returns a set of new or overriden packages. | ||
# The `packageOverrides' function is called with the *original* | ||
# (un-overriden) set of packages, allowing packageOverrides | ||
# attributes to refer to the original attributes (e.g. "foo = | ||
# ... pkgs.foo ..."). | ||
pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {})); | ||
|
||
mkOverrides = pkgsOrig: overrides: overrides // | ||
(lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig)); | ||
|
||
# Return the complete set of packages, after applying the overrides | ||
# returned by the `overrider' function (see above). Warning: this | ||
# function is very expensive! | ||
applyGlobalOverrides = overrider: | ||
let | ||
# Call the overrider function. We don't want stdenv overrides | ||
# in the case of cross-building, or otherwise the basic | ||
# overrided packages will not be built with the crossStdenv | ||
# adapter. | ||
overrides = mkOverrides pkgsOrig (overrider pkgsOrig); | ||
|
||
# The un-overriden packages, passed to `overrider'. | ||
pkgsOrig = pkgsFun pkgs {}; | ||
|
||
# The overriden, final packages. | ||
pkgs = pkgsFun pkgs overrides; | ||
in pkgs; | ||
|
||
# The package compositions. | ||
pkgsFun = pkgs: overrides: | ||
let | ||
self = self_ // overrides; | ||
self_ = import ./all-packages.nix { | ||
inherit self pkgs; | ||
inherit system crossSystem platform bootStdenv noSysDirs gccWithCC | ||
gccWithProfiling config; | ||
}; | ||
|
||
aliases = import ./all-packages-aliases.nix self; | ||
|
||
tweakAlias = _n: alias: with lib; | ||
if alias.recurseForDerivations or false then | ||
removeAttrs alias ["recurseForDerivations"] | ||
else alias; | ||
|
||
in lib.mapAttrs tweakAlias aliases // self; | ||
|
||
in pkgs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not refer to
../../..
(i.e. the top-leveldefault.nix
)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I will do that.