Skip to content
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

Use unit id for package key #2239

Merged
merged 97 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
3e1c1b9
Add available targets to plan.json
hamishmack Aug 9, 2024
1bf543c
update nix-tools-static.nix
Aug 9, 2024
329548e
Use unit id for package key
hamishmack Aug 9, 2024
0d6d9e5
Update overlays/haskell.nix
hamishmack Aug 9, 2024
5d8a9ad
Rename plan-json projectNix
hamishmack Aug 9, 2024
db0a77a
Source location fixes
hamishmack Aug 10, 2024
83db180
Fix projects not in sub dir
hamishmack Aug 10, 2024
02edb82
Add `identifier` and `checks` to `hsPkgs.${pkg-name}`
hamishmack Aug 12, 2024
baad5ae
Fix setup dependencies
hamishmack Aug 12, 2024
f01d23c
Enable component overrides by package name
hamishmack Aug 13, 2024
185b40e
Fix for building iserv-proxy
hamishmack Aug 13, 2024
bf4b6f2
Add support for package level overrides
hamishmack Aug 13, 2024
77431cc
Disable aarch64-linux on hydra
hamishmack Aug 13, 2024
9014e6e
Fix more override types
hamishmack Aug 14, 2024
2758551
Support for overriding package src
hamishmack Aug 14, 2024
c9ffefb
Support for overriding package src
hamishmack Aug 14, 2024
d83e2df
Try using unsafeDiscardStringContext
hamishmack Aug 15, 2024
5d4bcd8
Fix absolute paths
hamishmack Aug 15, 2024
d91fcf0
Fix absolute paths
hamishmack Aug 15, 2024
f7f06b3
Library component may not have exe-depends
hamishmack Aug 15, 2024
bf06758
More fixes
hamishmack Aug 16, 2024
a242292
Don't set values for pre-existing packages
hamishmack Aug 16, 2024
081da23
disable macOS for now
hamishmack Aug 16, 2024
d3f35cb
Fix for cross compilation
hamishmack Aug 16, 2024
cfe3bf2
Revert "disable macOS for now"
hamishmack Aug 16, 2024
278df11
Per component pre-exisiting depends
hamishmack Aug 19, 2024
c69b53f
Fix handling of buildable: False
hamishmack Aug 19, 2024
7595b61
Add `pre-existing` to component module
hamishmack Aug 19, 2024
f7adf1a
Fix path logic
hamishmack Aug 19, 2024
144ee20
Use pkgsBuildBuild for setup.depends
hamishmack Aug 19, 2024
52ff297
Update overlays/haskell.nix
hamishmack Aug 19, 2024
89a13e8
Update overlays/haskell.nix
hamishmack Aug 19, 2024
f5f959a
Fix using wrong .cabal file
hamishmack Aug 20, 2024
9133141
Fix th-dlls-minimal test
hamishmack Aug 20, 2024
59ff888
Fix callCabalProjectToNix test
hamishmack Aug 20, 2024
c04191e
fix cabal-hpack tests
hamishmack Aug 21, 2024
a9fd2b6
fix cabal-hpack tests
hamishmack Aug 21, 2024
4e6a7d5
Fix source repo subdir
hamishmack Aug 23, 2024
a25b0c2
Fix hackage revisions
hamishmack Aug 23, 2024
a3380ae
Fix hackage revisions
hamishmack Aug 23, 2024
b68279a
Fix TH compilation for GHCJS
hamishmack Aug 26, 2024
0b332f8
Fix hydra eval error
hamishmack Aug 26, 2024
637a6b8
Fix `with-packages` test
hamishmack Aug 27, 2024
88ed729
Fix package level component options
hamishmack Aug 27, 2024
f15cebc
Leave out `ghc-boot-packages`
hamishmack Aug 30, 2024
7c7b937
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Aug 30, 2024
27cc10a
Pass null for hsPkgs when it is not needed
hamishmack Aug 30, 2024
ea77ac0
Fixes for ghcjs 8.10.7
hamishmack Aug 31, 2024
aa50765
Fix "Multiple versions for Win32"
hamishmack Aug 31, 2024
c45c70f
Fixes for ghcjs 8.10.7
hamishmack Sep 2, 2024
cdc0caf
Fix coverage reports
hamishmack Sep 3, 2024
ab35f48
Include pre-existing, libs, pkgconfig and frameworks for shell
hamishmack Sep 3, 2024
b197a5a
Include pre-existing, libs, pkgconfig and frameworks for shell
hamishmack Sep 3, 2024
4138a45
Add identifier.id defaultText
hamishmack Sep 3, 2024
3f721cf
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 3, 2024
ce1a3fc
Use `mkAliasDefinitions` to copy package overrides
hamishmack Sep 3, 2024
55b8a42
Add missing package keys
hamishmack Sep 3, 2024
d07d99b
Fix githash test
hamishmack Sep 3, 2024
2ada9c4
Update modules/plan.nix
hamishmack Sep 3, 2024
4cec161
Fix subDir
hamishmack Sep 4, 2024
38c25f2
Fix logic for detecting cabal-doctest
hamishmack Sep 4, 2024
5b12bd8
Fix logic for detecting cabal-doctest
hamishmack Sep 4, 2024
ceab542
Fix logic for detecting cabal-doctest
hamishmack Sep 4, 2024
b95d648
Remove os-string flag workaround that should not be needed any more
hamishmack Sep 5, 2024
905f598
Try without ghcjs overrides for pre-existing package (might not be ne…
hamishmack Sep 5, 2024
c658644
Try to fix js-template-haskell test
hamishmack Sep 5, 2024
c47949d
Add ghci for ghcjs to test/cabal.project.local
hamishmack Sep 5, 2024
495cae2
Fix ghc-lib-parser-8.10.7.20220219
hamishmack Sep 5, 2024
17aabb8
Simpler fix for ghc-lib-parser
hamishmack Sep 6, 2024
ae34d8a
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 6, 2024
1254ba4
Use new `time` with GHC HEAD
hamishmack Sep 6, 2024
0c1fdfc
Move modules for using `plan.json` `install-plan` into separate files.
hamishmack Sep 6, 2024
8fa0abb
Fix setting of `planned` flag
hamishmack Sep 6, 2024
4cb4268
Update hydra eval checks
hamishmack Sep 8, 2024
0fddc58
Use pinned tools for check-hydra
hamishmack Sep 9, 2024
e46398c
Use pinned tools for check-hydra
hamishmack Sep 9, 2024
9c28621
Add allowed-uris arg
hamishmack Sep 9, 2024
b3f567a
Add allowed-uris arg
hamishmack Sep 9, 2024
ffd40a3
Add materialized file needed for cross platform eval
hamishmack Sep 9, 2024
7b3b449
Add comments
hamishmack Sep 9, 2024
1257535
Remove unused binding
hamishmack Sep 9, 2024
a479589
Add loadCabalPlan function
hamishmack Sep 9, 2024
c73c30e
Skip darwin when testing hydra eval in github action
hamishmack Sep 9, 2024
b2829bb
Fix hydra eval github action
hamishmack Sep 9, 2024
6a431ff
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 9, 2024
4b6ad33
Leave redirects out of `allHsPkgsComponents`
hamishmack Sep 10, 2024
0b10d7a
Include hsPkgs."${name}-${version}"
hamishmack Sep 10, 2024
47a3191
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 11, 2024
489b333
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 12, 2024
5109ce5
Add `buildType` and `setup` to `hsPkgs` redirects
hamishmack Sep 12, 2024
7f79219
Add change log entry
hamishmack Sep 16, 2024
181931b
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 16, 2024
8356b9d
Update change log entry
hamishmack Sep 16, 2024
6127a31
Update change log entry
hamishmack Sep 16, 2024
b0182bb
Avoid running githash test on every commit
hamishmack Sep 16, 2024
2c2ecb4
Merge remote-tracking branch 'origin/master' into hkm/use-plan-json
hamishmack Sep 17, 2024
b6b8c46
Avoid running githash test on every commit
hamishmack Sep 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 15 additions & 24 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,49 +139,40 @@ jobs:

hydra-ifdLevel-0-and-1:
runs-on: [self-hosted, linux]
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: "Check that jobset will evaluate in Hydra at ifdLevel 0 and 1"
run: |
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
./check-hydra.sh --arg ifdLevel 0
./check-hydra.sh --arg ifdLevel 1
sed -i 's/runningHydraEvalTest = false;/runningHydraEvalTest = true;/' flake.nix
sed -i 's/ifdLevel = 3;/ifdLevel = 0;/' flake.nix
./check-hydra.sh
sed -i 's/ifdLevel = 0;/ifdLevel = 1;/' flake.nix
./check-hydra.sh

hydra-ifdLevel-2:
runs-on: [self-hosted, linux]
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: "Check that jobset will evaluate in Hydra at ifdLevel 2"
run: |
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
./check-hydra.sh --arg ifdLevel 2
sed -i 's/runningHydraEvalTest = false;/runningHydraEvalTest = true;/' flake.nix
sed -i 's/ifdLevel = 3;/ifdLevel = 2;/' flake.nix
./check-hydra.sh

hydra-ifdLevel-3-and-ghc-8-10:
hydra-ifdLevel-3:
runs-on: [self-hosted, linux]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 8.10"
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3"
run: |
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 6 x == "ghc810"'

hydra-ifdLevel-3-and-ghc-9-2:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 9.2"
run: |
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 5 x == "ghc92"'

hydra-ifdLevel-3-and-not-ghc-8-10-or-9-2:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and not (ghc 8.10 or ghc 9.2)"
run: |
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
./check-hydra.sh --arg ifdLevel 3 --arg include 'x: !(__substring 0 6 x == "ghc810" || __substring 0 5 x == "ghc92")'
sed -i 's/runningHydraEvalTest = false;/runningHydraEvalTest = true;/' flake.nix
./check-hydra.sh

closure-size:
runs-on: [self-hosted, linux]
Expand Down
2 changes: 1 addition & 1 deletion builder/comp-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let self =
# (not just the one we are building).
# Enable for tests in packages that use cabal-doctest.
( haskellLib.isTest componentId &&
lib.any (x: x.identifier.name or "" == "cabal-doctest") package.setup-depends
lib.any (x: x.identifier.name or "" == "cabal-doctest") (package.setup-depends ++ setup.config.depends or [])
)
, allComponent # Used when `configureAllComponents` is set to get a suitable configuration.

Expand Down
2 changes: 1 addition & 1 deletion builder/make-config-files.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let
# Sort and remove duplicates from nonReinstallablePkgs.
# That way changes to the order of nonReinstallablePkgs does not require rebuilds.
nonReinstallablePkgs' = __attrNames (lib.genAttrs nonReinstallablePkgs (x: x));
nonReinstallablePkgs' = __attrNames (lib.genAttrs (component.pre-existing or [] ++ nonReinstallablePkgs) (x: x));

ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;

Expand Down
10 changes: 6 additions & 4 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ let
selectedComponents =
lib.filter isSelectedComponent (lib.attrValues transitiveDependenciesComponents);

allHsPkgsComponents = lib.concatMap haskellLib.getAllComponents (builtins.attrValues hsPkgs);
allHsPkgsComponents = lib.concatMap haskellLib.getAllComponents
(lib.filter (x: !(x.isRedirect or false)) (builtins.attrValues hsPkgs));

# Given a list of `depends`, removes those which are selected components
removeSelectedInputs =
Expand Down Expand Up @@ -114,9 +115,10 @@ let
# Set up a "dummy" component to use with ghcForComponent.
component = {
depends = packageInputs;
libs = [];
pkgconfig = [];
frameworks = [];
pre-existing = lib.concatMap (x: (haskellLib.dependToLib x).config.pre-existing or []) packageInputs;
libs = lib.concatMap (x: (haskellLib.dependToLib x).config.libs or []) packageInputs;
pkgconfig = lib.concatMap (x: (haskellLib.dependToLib x).config.pkgconfig or []) packageInputs;
frameworks = lib.concatMap (x: (haskellLib.dependToLib x).config.frameworks or []) packageInputs;
doExactConfig = false;
};
configFiles = makeConfigFiles {
Expand Down
76 changes: 76 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,82 @@
This file contains a summary of changes to Haskell.nix and `nix-tools`
that will impact users.

## Sep 17, 2024

Cabal projects now use the more granular Unit IDs from plan.json
to identify packages. This allows for different versions of a
package to be used when building `built-tool-depends` and setup
dependencies.

Overrides in the `modules` argument apply to all versions of
the package. However to make this work we needed to make
each `packages.somepackage` an option (instead of using an
`attrsOf` the submodule type).

It is now an error to override a package that is not in the
plan. This can be a problem if different GHC versions, target
platforms, or cabal flag settings cause the package to be
excluded from the plan. Adding `package-keys` can tell
haskell.nix to include the option anyway:

```
modules = [{
# Tell haskell.nix that `somepackage` may exist.
package-keys = ["somepackage"];
# Now the following will not cause an error even
# if `somepackage` is not in the plan
packages.somepackage.flags.someflag = true;
}];
```

There is a helper function you can use to add `package-keys`
for all of the `builtins.attrNames` of `packages`:

```
modules = [(pkgs.haskell-nix.haskellLib.addPackageKeys {
packages.somepackage.flags.someflag = true;
})];
```

Do not use the module's `pkgs` arg to look `addPackageKeys` up
though or it will result an `infinite recursion` error.

Code that uses `options.packages` will also need to be updated.
For instance the following code that uses `options.packages`
to set `--Werror` for local packages:

```
({ lib, ... }: {
options.packages = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule (
{ config, lib, ... }:
lib.mkIf config.package.isLocal
{
configureFlags = [ "--ghc-option=-Werror"];
}
));
};
})
```

Now needs to do it for each of the entry in `config.package-keys`
instead of using `attrsOf`:

```
({ config, lib, ... }: {
options.packages = lib.genAttrs config.package-keys (_:
lib.mkOption {
type = lib.types.submodule (
{ config, lib, ... }:
lib.mkIf config.package.isLocal
{
configureFlags = [ "--ghc-option=-Werror"];
}
);
});
})
```

## Jun 5, 2024

Haskell.nix now respects the `pre-existing` packages selected
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"hls-2.6" = { url = "github:haskell/haskell-language-server/2.6.0.0"; flake = false; };
"hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; };
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
"hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.0"; flake = false; };
"hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.1"; flake = false; };
hydra.url = "hydra";
hackage = {
url = "github:input-output-hk/hackage.nix";
Expand Down Expand Up @@ -91,6 +91,7 @@
callFlake = import flake-compat;

ifdLevel = 3;
runningHydraEvalTest = false;
compiler = "ghc928";
config = import ./config.nix;

Expand All @@ -108,9 +109,10 @@
# systems supported by haskell.nix
systems = [
"x86_64-linux"
] ++ (if runningHydraEvalTest then [] else [
"x86_64-darwin"
"aarch64-darwin"
];
]);

nixpkgsArgs = {
inherit config;
Expand Down Expand Up @@ -282,13 +284,14 @@
traceHydraJobs (lib.recursiveUpdate flake (lib.optionalAttrs (ifdLevel > 2) {
hydraJobs.nix-tools = pkgs.releaseTools.aggregate {
name = "nix-tools";
constituents = [
constituents = (if runningHydraEvalTest then [] else [
"aarch64-darwin.nix-tools.static.zipped.nix-tools-static"
"x86_64-darwin.nix-tools.static.zipped.nix-tools-static"
"x86_64-linux.nix-tools.static.zipped.nix-tools-static"
"x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64"
"aarch64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd"
"x86_64-darwin.nix-tools.static.zipped.nix-tools-static-no-ifd"
]) ++ [
"x86_64-linux.nix-tools.static.zipped.nix-tools-static"
"x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64"
"x86_64-linux.nix-tools.static.zipped.nix-tools-static-no-ifd"
"x86_64-linux.nix-tools.static.zipped.nix-tools-static-arm64-no-ifd"
(writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000"))
Expand Down
22 changes: 13 additions & 9 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,11 @@ let
'';
};

plan-nix = materialize ({
plan-json = materialize ({
inherit materialized;
sha256 = plan-sha256;
sha256Arg = "plan-sha256";
this = "project.plan-nix" + (if name != null then " for ${name}" else "");
this = "project.plan-json" + (if name != null then " for ${name}" else "");
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
inherit checkMaterialization;
}) (evalPackages.runCommand (nameAndSuffix "plan-to-nix-pkgs") {
Expand All @@ -564,7 +564,6 @@ let
# These two output will be present if in cabal configure failed.
# They are used to provide passthru.json and passthru.freeze that
# check first for cabal configure failure.
"json" # The `plan.json` file generated by cabal and used for `plan-to-nix` input
"freeze" # The `cabal.project.freeze` file created by `cabal v2-freeze`
];
} ''
Expand Down Expand Up @@ -619,7 +618,7 @@ let
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt

CABAL_DIR=${
export CABAL_DIR=${
# This creates `.cabal` directory that is as it would have
# been at the time `cached-index-state`. We may include
# some packages that will be excluded by `index-state-max`
Expand All @@ -630,7 +629,9 @@ let
index-state = cached-index-state;
sha256 = index-sha256-found;
}
} make-install-plan ${
}

make-install-plan ${
# Setting the desired `index-state` here in case it is not
# in the cabal.project file. This will further restrict the
# packages used by the solver (cached-index-state >= index-state-max).
Expand Down Expand Up @@ -676,17 +677,20 @@ let
# proper relative paths.
(cd $out${subDir'} && plan-to-nix --full ${if ignorePackageYaml then "--ignore-package-yaml" else ""} --plan-json $tmp${subDir'}/dist-newstyle/cache/plan.json -o .)

substituteInPlace $tmp${subDir'}/dist-newstyle/cache/plan.json --replace "$out" "."
substituteInPlace $tmp${subDir'}/dist-newstyle/cache/plan.json --replace "$CABAL_DIR" ""

# Replace the /nix/store paths to minimal git repos with indexes (that will work with materialization).
${fixedProject.replaceLocations}

# Make the plan.json file available in case we need to debug plan-to-nix
cp $tmp${subDir'}/dist-newstyle/cache/plan.json $json

# Remove the non nix files ".project" ".cabal" "package.yaml" files
# as they should not be in the output hash (they may change slightly
# without affecting the nix).
find $out \( -type f -or -type l \) ! -name '*.nix' -delete

# Make the plan.json file available in case we need to debug plan-to-nix
cp $tmp${subDir'}/dist-newstyle/cache/plan.json $out

# Make the revised cabal files available (after the delete step avove)
echo "Moving cabal files from $tmp${subDir'}/dist-newstyle/cabal-files to $out${subDir'}/cabal-files"
mv $tmp${subDir'}/dist-newstyle/cabal-files $out${subDir'}/cabal-files
Expand All @@ -698,7 +702,7 @@ let
mv $out${subDir'}/pkgs.nix $out${subDir'}/default.nix
'');
in {
projectNix = plan-nix;
projectNix = plan-json;
inherit index-state-max src;
inherit (fixedProject) sourceRepos extra-hackages;
}
2 changes: 1 addition & 1 deletion lib/cover-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ in pkgs.runCommand "project-coverage-report"
fi

# Copy mix, tix, and html information over from each report
for f in $report/share/hpc/vanilla/mix/$identifier*; do
for f in $report/share/hpc/vanilla/mix/*; do
cp -Rn $f $out/share/hpc/vanilla/mix
done
cp -R $report/share/hpc/vanilla/tix/* $out/share/hpc/vanilla/tix/
Expand Down
9 changes: 6 additions & 3 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ in {
# Was there a reference to the package source in the `cabal.project` or `stack.yaml` file.
# This is used to make the default `packages` list for `shellFor`.
isLocalPackage = p: p.isLocal or false;
selectLocalPackages = lib.filterAttrs (_n: p: p != null && isLocalPackage p);
isRedirectPackage = p: p.isRedirect or false;
selectLocalPackages = lib.filterAttrs (_n: p: p != null && isLocalPackage p && !isRedirectPackage p);

# if it's a project package it has a src attribute set with an origSubDir attribute.
# project packages are a subset of localPackages
isProjectPackage = p: p.isProject or false;
selectProjectPackages = lib.filterAttrs (_n: p: p != null && isLocalPackage p && isProjectPackage p);
selectProjectPackages = lib.filterAttrs (_n: p: p != null && isLocalPackage p && isProjectPackage p && !isRedirectPackage p);

# Format a componentId as it should appear as a target on the
# command line of the setup script.
Expand Down Expand Up @@ -341,7 +342,7 @@ in {
# Converts from a `compoent.depends` value to a library derivation.
# In the case of sublibs the `depends` value should already be the derivation.
dependToLib = d:
# Do simplify this to `d.components.library or d`, as that
# Do not simplify this to `d.components.library or d`, as that
# will not give a good error message if the `.library`
# is missing (happens if the package is unplanned,
# but has overrides).
Expand Down Expand Up @@ -613,4 +614,6 @@ in {
}";

types = import ./types.nix { inherit lib; };

addPackageKeys = x: x // { package-keys = builtins.attrNames x.packages; };
}
Loading
Loading