54 Commits
Author SHA1 Message Date
Naïm Camille Favier 388d2251ee agda: skip eval errors in allPackages
This fixes `agda.tests.allPackages`, which currently fails when aliases
are enabled because `agdaPackages.generic` throws an evaluation error.
2026-03-23 12:32:51 +01:00
Stefan Frijters 59b5633f81 agdaPackages.mkDerivation: move LC_ALL into env for structuredAttrs 2026-03-23 12:01:38 +01:00
Rasheeq Azad 1edff9d8ae build-support/agda: Keep passthru in mkDerivation 2025-11-27 09:00:28 -05:00
Carlos Tomé Cortiñas 55ac814fa9 Conditionally create symlink to agda-mode if present 2025-10-28 18:21:23 +01:00
Carlos Tomé CortiñasandPhilip Taron 4c64e800a3 Update pkgs/build-support/agda/default.nix
Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-10-28 18:21:22 +01:00
Carlos Tomé Cortiñas a8967950c8 Remove agda-mode from executables 2025-10-28 18:21:22 +01:00
Carlos Tomé Cortiñas 0483e40bec Replace hardcoded agda binary by name from package 2025-10-28 18:21:21 +01:00
wrvsrx 1df3c7cb48 agda.withPackages: add libraryFile to passthru 2025-10-02 14:55:13 +08:00
Philip TaronandGitHub 1d2cfef5e9 agda: fixes for 2.8.0 (#424180) 2025-07-17 14:56:33 -07:00
Naïm Camille Favier 30cee69bb9 haskellPackages.Agda: set mainProgram 2025-07-16 19:01:05 +02:00
Naïm Camille Favier 4d3c5d0dc3 agda: use getBin Agda instead of Agda.bin
Makes the wrapper work if `enableSeparateBinOutput` is off.
2025-07-16 17:34:58 +02:00
Naïm Camille Favier 1288f57e55 agdaPackages: switch to --build-library
Use the new `--build-library` mode introduced in Agda 2.8.0 to build
libraries instead of relying on ad-hoc `Everything` files. This
simplifies most derivations (except cubical-mini which imports generated
`Everything` files from various modules).
2025-07-16 12:21:39 +02:00
Tsung-Ju Chiang 17501d776b agda.withPackages: allow installing Agda without GHC using ghc = null; 2025-05-28 22:59:43 +08:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Naïm Favier 4ef7bf78bb build-support/agda: expose mkLibraryFile 2024-07-04 14:51:30 +02:00
Philipp Joram 294245f750 haskellPackages.Agda: Split outputs to reduce closure size
After enabling a separate binary output for the `Agda` Haskell package,
the new `bin` output measures ~100MiB, compared to the ~4.5GiB before.
Using it in `agdaWithPackages` reduces the closure size of an Agda
installation from ~5GiB to ~3GiB.  The remaining space is taken up
mostly by the GHC backend.

With this change, derivations depending on `haskellPackages.Agda`
directly need to pick the right (binary) output.  This concerns in
particular `emacsPackages.agda2-mode`.
2024-04-07 16:36:57 +03:00
github-actions[bot]andGitHub b4bf622e46 Merge master into staging-next 2024-03-31 12:01:07 +00:00
Philip TaronandValentin Gagarin 8c4a1e8d66 Avoid top-level with ...; in pkgs/build-support/agda/default.nix 2024-03-19 22:31:19 +01:00
ibbem b9343ad4c6 agda: Don't be too picky about everythingFile
The `-path` test of `find` does string comparison, not path comparison.
Hence, the format of `everythingFile` needed to be very specific. Now,
it can be denormalized (e.g. it can contain `/./`) and an error is
emitted if the everything file or its interface file can't be removed.
2024-03-18 23:11:20 +01:00
ibbem 1642654453 agda: Remove the --local-interfaces flag
Upstream now provides a library file for the builtin library and ensured
that the existing interface files will be used regardless of whether
--local-interfaces is in effect. Hence, Agda will not try to write to
the Nix store anymore except if the build flags are changed.
2024-03-18 23:10:27 +01:00
Naïm Favier 6c2b227d34 agdaPackages.*: support literate Typst files 2023-10-24 20:34:05 +02:00
sternenseemann bbe6402eca Merge remote-tracking branch 'origin/master' into haskell-updates 2023-02-18 21:56:57 +01:00
Ingo Blechschmidtandsternenseemann 168d9a5f1e agda: 2.6.2.2 -> 2.6.3 2023-02-14 14:45:39 +01:00
Naïm Favier 65e774e2a4 agda: fix passthru
The current `//` override to `agda.passthru.tests` is non-recursive so
it destroys everything else under `passthru`, and furthermore does not
go through `mkDerivation` so that we end up with different values for
`agda.tests` and `agda.passthru.tests`.

Fix it by moving the `allPackages` test to the definition of
`withPackages`.
2023-02-12 14:44:16 +01:00
Naïm FavierandManuel Bärenz bbb6af88eb agda: pass through meta 2023-01-12 22:26:05 +01:00
Manuel BärenzandGitHub 7a135abf60 Merge pull request #98214 from turion/dev_test_all_agda_packages
Fix #98209. Test all agda packages
2021-10-19 09:56:50 +02:00
Manuel Bärenz 58ec6ce9b5 build-support/agda: Make includePaths configurable 2021-08-30 09:20:35 +02:00
Robert Hensing fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
Manuel Bärenz 33355cc5be agdaPackages: Build reverse dependencies on test 2021-08-03 13:33:59 +02:00
Manuel Bärenzandsterni af84eacb05 agdaPackages: Don't build broken packages on hydra 2021-07-22 17:29:09 +02:00
Jonas ChevalierandGitHub c6b62f2381 mkShell: introduce packages argument (#122180)
The distinction between the inputs doesn't really make sense in the
mkShell context.  Technically speaking, we should be using the
nativeBuildInputs most of the time.

So in order to make this function more beginner-friendly, add "packages"
as an attribute, that maps to nativeBuildInputs.

This commit also updates all the uses in nixpkgs.
2021-05-13 19:17:29 +02:00
Alex Rice 0e162b97d6 agda nixos test: add to passthru for agda + stdlib 2021-03-30 13:54:02 +01:00
Anderson TorresandGitHub 8bf1bc692c Merge pull request #110512 from neosimsim/agda-dont-install-Everything
Agda don't install Everything module
2021-02-03 15:56:34 -03:00
Alexander Ben Nasrallah 226299e1a2 agdaPackages.mkDerivation: don't install Everything module
The Everthing module is not part of a library and should therefore
not be copied to the nix store.

This is particularly bad, if the Everything module is defined in
an agda library included directory, e.g. consider an agda-lib with

    include: .

and Everything.agda in the project root (.), in which case the
Everything module would become part of the library.
If multiple such projects are in the dependency tree, the Everything
module becomes ambiguous and the build would fail.
2021-01-24 17:30:01 +01:00
Alexander Ben Nasrallah b4b4e36921 agda.withPackages: use GHC with ieee754 as default
As mentioned in the package description of ieee on Hackage,
ieee is deprecated in favor of ieee754.
2021-01-22 16:13:46 +01:00
Alex Rice e215c3bcac agda: install literate files 2020-06-01 13:59:20 +01:00
Alex Rice d30e2468e0 agda: rework builder 2020-05-14 20:54:11 +01:00
Robin GlosterandJan Tojnar ac8eaa8507 treewide: fix *Flags 2019-12-30 04:50:37 +01:00
Mateusz Kowalczyk 1451a52a38 Remove myself (fuuzetsu) from maintainer lists
I haven't been doing any maintenance for a long time now and not only
do I get notified, it also creates a fake impression that all these
packages had at least one maintainer when in practice they had none.
2019-12-05 16:29:48 +09:00
Dmitry Kalinkin 3b6de72836 agda: use exec in agdaWrapper 2018-12-07 21:37:19 -05:00
Moritz Kiefer 0266996a8d agda: use writeShellScriptbin instead of writeScriptBin
This adds the shell shebang to the wrapper script. Without this,
emacs and in particular agda2-mode (but probably other applications as
well) return a format error when trying to execute agda.
2018-11-08 17:53:29 +01:00
John Ericson be2cba690c agda: Remove unused/uneeded abstractions, including postprocess 2015-05-31 01:55:10 +00:00
John Ericson 9b31a07b0d agda: Just with all of the string helper functions 2015-05-31 01:54:09 +00:00
John Ericson 21b10ab44f agda: postprocess and defaults need not be in the scope of args 2015-05-30 19:22:32 +00:00
John Ericson c1f5748983 agda: Provide a .env like Haskell instead of .extras 2015-05-30 15:10:30 +00:00
John Ericson 91ab6c9e89 agda: Wrapper is no longer built by default
Instead it is provided to the user who can choose whether or not
to include it in the final derivati. Example of including would
be:

```nix
callPackage ... (self: { inherit (self.extras) extraThing; })
```

These extras are also available downstream without being built by
default. This is achieved with `passthru`.
2015-05-20 16:01:40 +00:00
John Ericson 33c28bdc83 agda: Agda dependencies are treated seperately
- Only they are added to the optional build path (share/agda)
 - Only they are are passed as an include dir (share/agda)
 - Only they are propigatedBuildInputs
2015-05-20 16:01:04 +00:00
John Ericson ae444ea4c4 agda: Remove extraBuildFlags
This is unused, future users can just use override `buildFlags`
and extend/replace as needed. `includeDirs` is provided for this
purpose.

We should add `dirOf self.everythingFile` rather than `.`, but
`dirOf` breaks on relative paths so that is not an option.
2015-05-18 12:33:00 -04:00
John Ericson 95c1c686a3 agda: Remove buildTools, it is unused 2015-05-18 04:10:37 +00:00