Commit Graph

26 Commits

Author SHA1 Message Date
Peter H. Hoeg
5178c2525f crystal.buildCrystalPackage: fix {pre,post}InstallCheck skips
This then broke things like `versionCheckHook` and anything else that
injects itself into the `preInstallCheck` phase.
2026-06-05 08:09:35 +01:00
Peter Hoeg
2c6f1ffebf crystal.buildCrystalPackage: fix installCheckPhase glob pattern (#477878) 2026-06-01 06:55:53 +00:00
Peter H. Hoeg
05f00b2fde buildCrystalPackage: fix env overrides
Passing variables through `env` was broken for 2 reasons:

1. due to missing parens, no merging of `env` would take place, and
2. it was impossible to override defaults due to the order
2026-03-29 21:07:47 +02:00
Luna Simons
921a535cf0 buildCrystalPackage: pass env variable(s) down from args 2026-03-10 09:40:37 +01:00
Stefan Frijters
8908beaf74 buildCrystalPackage: move env variable(s) into env for structuredAttrs 2026-02-09 22:36:21 +01:00
david amick
c2ba8dc072 crystal.buildCrystalPackage: fix installCheckPhase glob pattern
The installCheckPhase uses `[ $f == $out/bin/*.dwarf ]` to skip .dwarf
files, but when no .dwarf files exist, the glob doesn't expand and bash's
`[` builtin fails with "unary operator expected".

Switch to `[[ ]]` which handles glob patterns correctly without expansion.
2026-01-07 13:34:22 -08:00
NAHO
c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02: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 a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
sunder
9c1f3b305a buildCrystalPackage: add copyShardDeps flag 2024-04-19 01:38:55 -07:00
Ulysses Zhan
23dfcf5c2d crystal.buildCrystalPackage: fix a precedence mistake that prevents overriding configure phase 2024-03-22 00:39:34 -07:00
Weijia Wang
efa78c18f0 Merge pull request #226932 from wegank/crystal-pcre
crystal: migrate to pcre2 on 1.8
2023-04-19 09:09:51 +03:00
Weijia Wang
995ace105b crystal: migrate to pcre2 on 1.8 2023-04-19 01:34:56 +03:00
Weijia Wang
2041e40162 crystal.buildCrystalPackage: ignore dwarf files 2023-04-19 00:16:37 +03:00
Peter Hoeg
a5a5849f27 crystal: do not build with --no-debug 2022-09-30 21:04:56 +08:00
Artturin
d6d211b445 buildCrystalPackage: enableParallelBuilding 2022-05-22 22:30:45 +03:00
Artturin
a0d4618e7f buildCrystalPackage: enable strictDeps
it improves package correctness and keeps cross-compilation in good
health
there aren't many uses of buildCrystalPackage in nixpkgs yet so imo its
safe to turn it on

python builder, rust build, go builder, and others all turn it on
2022-05-10 04:57:46 +03:00
Peter Hoeg
16998f568b crystal-builder: support the new crystal2nix format 2022-04-09 22:02:10 +08:00
Peter Hoeg
c1a928b30b crystal: remove pointless reference to crystal.lib 2022-03-28 09:16:31 +08:00
Peter Hoeg
8a9421f028 crystal: add support for passing custom build options when using the shard builder 2022-02-28 15:04:31 +08:00
Artturin
afb755e706 buildCrystalPackage: use --no-debug
it was causing problems with the installCheckPhase due to it generating
.dwarf files
2021-09-27 00:39:08 +03:00
Artturin
9a3ed0e8c5 buildCrystalPackage: redirect stdout to /dev/null
makes build errors easier to diagnose
2021-09-27 00:15:10 +03:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Peter Hoeg
61626d70e5 buildCrystalPackage: support shards v0.12 properly 2020-12-28 16:21:23 +08:00
Peter Hoeg
912eb6b120 crystal: build using Makefile or shards if available 2020-04-22 17:30:22 +08:00
Silvan Mosberger
a3aec20f26 Implement crystal.buildCrystalPackage 2019-08-26 18:22:55 +02:00