From 2296ed31bc131fcded20b2178a209a338a86b751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Camille=20Favier?= Date: Wed, 16 Jul 2025 18:08:26 +0200 Subject: [PATCH] haskellPackages.Agda: set `mainProgram` (cherry picked from commit 30cee69bb9ccfb280a9edafbb39b7eef713de47b) --- pkgs/build-support/agda/default.nix | 4 ++-- pkgs/development/haskell-modules/configuration-nix.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 957b423c31f6..2c6b53ea1abf 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -65,10 +65,10 @@ let } '' mkdir -p $out/bin - makeWrapper ${Agda.bin}/bin/agda $out/bin/agda \ + makeWrapper ${lib.getExe Agda} $out/bin/agda \ --add-flags "--with-compiler=${ghc}/bin/ghc" \ --add-flags "--library-file=${library-file}" - ln -s ${Agda.bin}/bin/agda-mode $out/bin/agda-mode + ln -s ${lib.getExe' Agda "agda-mode"} $out/bin/agda-mode ''; withPackages = arg: if isAttrs arg then withPackages' arg else withPackages' { pkgs = arg; }; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 59d67c1f7f34..35b6c7877049 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1352,6 +1352,8 @@ builtins.intersectAttrs super { # very useful. # Flag added in Agda 2.6.4.1, was always enabled before (enableCabalFlag "debug") + # Set the main program + (overrideCabal { mainProgram = "agda"; }) # Split outputs to reduce closure size enableSeparateBinOutput ];