Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{ trivialBuild
, haskellPackages
}:

trivialBuild rec {
let
Agda = haskellPackages.Agda.bin;
in
trivialBuild {
pname = "agda-mode";
version = haskellPackages.Agda.version;
version = Agda.version;

dontUnpack = true;

# already byte-compiled by Agda builder
buildPhase = ''
agda=`${haskellPackages.Agda}/bin/agda-mode locate`
agda=`${Agda}/bin/agda-mode locate`
cp `dirname $agda`/*.el* .
'';

meta = {
inherit (haskellPackages.Agda.meta) homepage license;
inherit (Agda.meta) homepage license;
description = "Agda2-mode for Emacs extracted from Agda package";
longDescription = ''
Wrapper packages that liberates init.el from `agda-mode locate` magic.
Expand Down
7 changes: 4 additions & 3 deletions pkgs/build-support/agda/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ let
allPackages = withPackages (filter self.lib.isUnbrokenAgdaPackage (attrValues self));
};
};
inherit (Agda) meta;
# Agda is a split package with multiple outputs; do not inherit them here.
meta = removeAttrs Agda.meta [ "outputsToInstall" ];
Comment on lines -43 to +44
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interaction of multiple-output packages and outputsToInstall was very surprising to me (Why does changing a meta attribute cause an evaluation error?? I believe I ran into #255947). Is removing outputsToInstall for the derived package the right thing to do here?

} ''
mkdir -p $out/bin
makeWrapper ${Agda}/bin/agda $out/bin/agda \
makeWrapper ${Agda.bin}/bin/agda $out/bin/agda \
--add-flags "--with-compiler=${ghc}/bin/ghc" \
--add-flags "--library-file=${library-file}"
ln -s ${Agda}/bin/agda-mode $out/bin/agda-mode
ln -s ${Agda.bin}/bin/agda-mode $out/bin/agda-mode
'';

withPackages = arg: if isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; };
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@ self: super: builtins.intersectAttrs super {
# very useful.
# Flag added in Agda 2.6.4.1, was always enabled before
(enableCabalFlag "debug")
# Split outputs to reduce closure size
enableSeparateBinOutput
];

# ats-format uses cli-setup in Setup.hs which is quite happy to write
Expand Down