-
Notifications
You must be signed in to change notification settings - Fork 244
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
Reduce the number of derivations #1605
Closed
Closed
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
b4a36e9
Store default setup on ghc derivation
hamishmack 9b06216
Less derivations first cut
hamishmack ad6a27a
Fixes and optimize nix-tools usage
hamishmack 1069180
Fix cabal.config
hamishmack d7004ee
Fix for cabal package db issue in nix shell
hamishmack 08bb11b
Fixes for shellFor and hoogle in shell
hamishmack c94ed63
Fixes for shellFor and hoogle in shell
hamishmack 417a7da
Fix hpack support
hamishmack afb52d9
Fix (p.shellFor {}).ghc
hamishmack 1aa5e2b
More fixes for shellFor
hamishmack 16e23cb
More fixes for shellFor
hamishmack 11fe87c
Use ghc env for exactDeps
hamishmack 12ecc24
Keep config files and wrapped ghc for cabal-doctest
hamishmack 51737c7
Fix name clash
hamishmack 82cda52
Remove special treatment of ghc dependency in custom setup
hamishmack af62a32
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack 14f7a4b
Fix ghcjs and use ln -s instead of cp
hamishmack 362b982
ifdLevel 0
hamishmack 07c4426
ifdLevel 1
hamishmack c744c1e
ifdLevel 2
hamishmack 0c6f255
ifdLevel 3
hamishmack 557bebc
Fix for ghcjs default setup
hamishmack acb0eb0
Only propagate inputs to library components
hamishmack d17dcbf
ifdLevel 0
hamishmack 872cb27
Shorten nix-tools attribute path
hamishmack db3ca22
Shorten nix-tools attribute path
hamishmack ba5bc4e
Fix closure size issue
hamishmack 46846bf
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack 42d08a6
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack e894bc2
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack 9499917
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack 5f32a61
ifdLevel 1
hamishmack eb6e1c2
Use cabal 3.8
hamishmack 0dedd34
ifdLevel 0
hamishmack eccd186
Use tool function for cabal
hamishmack bbcc46f
ifdLevel 1
hamishmack 1d7f07d
ifdLevel 2
hamishmack a17863c
ifdLevel 3
hamishmack 2611a66
Explicit pkg-config
hamishmack 0acd595
Merge branch 'hkm/use-cabal-3.8' into hkm/combined-derivations
hamishmack 8a0d0d1
Fix merge issue
hamishmack eec5710
ifdLevel 2
hamishmack 204296f
More fixes and work arounds
hamishmack a39ad04
Fix for cross compile
hamishmack 0e3417a
Fix test.sh
hamishmack 9621d93
Add description for `pkgconfigSelector`
hamishmack 09fec30
Merge branch 'hkm/use-cabal-3.8' into hkm/combined-derivations
hamishmack b5f42a5
Fix merge issue
hamishmack 8021d30
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack 489111a
Merge remote-tracking branch 'origin/master' into hkm/combined-deriva…
hamishmack db5eff6
Check that stack builds
hamishmack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ let | |
finalConfigureFlags = lib.concatStringsSep " " ( | ||
[ "--prefix=${componentDrv}" | ||
"${haskellLib.componentTarget componentId}" | ||
"$(cat ${docsConfigFiles}/configure-flags)" | ||
"$(cat $configFiles/configure-flags)" | ||
] | ||
++ commonConfigureFlags | ||
++ lib.optional doHaddock' " --docdir=${docdir "$doc"}"); | ||
|
@@ -63,28 +63,33 @@ let | |
name = fullName; | ||
|
||
passthru = { | ||
configFiles = docsConfigFiles; | ||
|
||
# The directory containing the haddock documentation. | ||
haddockDir = if doHaddock' then "${docdir drv.doc}/html" else null; | ||
haddockDir = lib.const (if doHaddock' then "${docdir drv.doc}/html" else null); | ||
}; | ||
|
||
# `out` contains the `package.conf.d` files used for building the | ||
# haddock files. | ||
# `doc` contains just the haddock output files. | ||
outputs = ["out"] | ||
outputs = ["out" "configFiles" "ghc"] | ||
++ lib.optional doHaddock' "doc"; | ||
|
||
propagatedBuildInputs = builtins.concatLists pkgconfig; | ||
propagatedBuildInputs = | ||
builtins.concatLists pkgconfig | ||
++ configFiles.libDeps; | ||
|
||
buildInputs = component.libs | ||
++ map (d: d.components.library.haddock or d) component.depends; | ||
buildInputs = component.libs; | ||
|
||
nativeBuildInputs = | ||
[ shellWrappers buildPackages.removeReferencesTo ] | ||
[ ghc buildPackages.removeReferencesTo ] | ||
++ componentDrv.executableToolDepends; | ||
|
||
configurePhase = '' | ||
mkdir -p $configFiles | ||
mkdir -p $ghc | ||
wrappedGhc=$ghc | ||
${docsConfigFiles.script} | ||
${shellWrappers.script} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now we're composing all these shell scripts together, maybe we should actually call them and pass the locations to write to as arguments rather than (effectively) sourcing them and passing arguments through variables? Not sure, just seems a little more explicit. |
||
PATH=$wrappedGhc/bin:$PATH | ||
runHook preConfigure | ||
echo Configure flags: | ||
printf "%q " ${finalConfigureFlags} | ||
|
@@ -145,7 +150,7 @@ let | |
# working hyper links. | ||
pkg=$(basename "$i") | ||
sed -e "s|haddock-interfaces:.*|haddock-interfaces: $docdir/html/${componentId.cname}.haddock|" -e "s|haddock-html:.*|haddock-html: $docdir/html/|" "$i" > "$pkg" | ||
${ghc.targetPrefix}ghc-pkg -v0 --package-db ${docsConfigFiles}/${configFiles.packageCfgDir} -f $out/package.conf.d register "$pkg" | ||
${ghc.targetPrefix}ghc-pkg -v0 --package-db $configFiles/${configFiles.packageCfgDir} -f $out/package.conf.d register "$pkg" | ||
done | ||
|
||
ln -s ${componentDrv}/exactDep $out/exactDep | ||
|
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.
Maybe we should just throw an error if it's before then? Otherwise it's probably surprising to people that this might pull in a whole extra nixpkgs?