-
Notifications
You must be signed in to change notification settings - Fork 257
Add prebuilt-depends for proprietary dependencies. #2444
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { stdenv, lib, haskellLib, ghc, nonReinstallablePkgs, runCommand, writeText, writeScript }@defaults: | ||
|
|
||
| { identifier, component, fullName, flags ? {}, needsProfiling ? false, enableDWARF ? false, chooseDrv ? drv: drv, nonReinstallablePkgs ? defaults.nonReinstallablePkgs }: | ||
| { identifier, component, fullName, flags ? {}, needsProfiling ? false, enableDWARF ? false, chooseDrv ? drv: drv, nonReinstallablePkgs ? defaults.nonReinstallablePkgs, prebuilt-depends ? [] }: | ||
|
|
||
| let | ||
| # Sort and remove duplicates from nonReinstallablePkgs. | ||
|
|
@@ -57,7 +57,7 @@ let | |
| ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x) | ||
| (map haskellLib.dependToLib component.depends)) | ||
| ) | ||
| ); | ||
| ) ++ prebuilt-depends; | ||
| script = '' | ||
| ${target-pkg} init $configFiles/${packageCfgDir} | ||
|
|
||
|
|
@@ -149,17 +149,6 @@ let | |
| echo "allow-older: ${identifier.name}:*" >> $configFiles/cabal.config | ||
| ''} | ||
|
|
||
| for p in "''${pkgsHostTarget[@]}"; do | ||
| if [ -e $p/envDep ]; then | ||
| cat $p/envDep >> $configFiles/ghc-environment | ||
| fi | ||
| ${ lib.optionalString component.doExactConfig '' | ||
| if [ -d $p/exactDep ]; then | ||
| cat $p/exactDep/configure-flags >> $configFiles/configure-flags | ||
| cat $p/exactDep/cabal.config >> $configFiles/cabal.config | ||
| fi | ||
| ''} | ||
| done | ||
| for p in ${lib.concatStringsSep " " nonReinstallablePkgs'}; do | ||
| if [ -e $ghcDeps/envDeps/$p ]; then | ||
| cat $ghcDeps/envDeps/$p >> $configFiles/ghc-environment | ||
|
|
@@ -172,6 +161,18 @@ let | |
| cat $ghcDeps/exactDeps/$p/cabal.config >> $configFiles/cabal.config | ||
| fi | ||
| done | ||
| '' + '' | ||
| for p in "''${pkgsHostTarget[@]}"; do | ||
| if [ -e $p/envDep ]; then | ||
| cat $p/envDep >> $configFiles/ghc-environment | ||
| fi | ||
| ${ lib.optionalString component.doExactConfig '' | ||
| if [ -d $p/exactDep ]; then | ||
| cat $p/exactDep/configure-flags >> $configFiles/configure-flags | ||
| cat $p/exactDep/cabal.config >> $configFiles/cabal.config | ||
| fi | ||
| ''} | ||
| done | ||
|
||
| '' | ||
| # This code originates in the `generic-builder.nix` from nixpkgs. However GHC has been fixed | ||
| # to drop unused libraries referenced from libraries; and this patch is usually included in the | ||
|
|
||
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.
We should add a comment here. As I'm a bit fuzzy on what exactly prebuilt-depends are, I'm not sure I can come up with a good comment yet.
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.
added a new
Note [prebuilt dependencies], does that help?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.
This is great! 🫰