Commit Graph

32 Commits

Author SHA1 Message Date
Sigmanificient
0bbc8dffae treewide: set meta.license on hooks 2026-05-25 13:48:20 +02:00
Nikolay Korotkiy
1d08aec95a hare: 0.26.0 -> 0.26.0.1 (#516847) 2026-05-05 19:30:57 +00:00
R. Ryantm
93a7ac8437 hare: 0.26.0 -> 0.26.0.1 2026-05-05 12:31:20 +00:00
Colin
1dcbce2c67 hare: fix musl build
fixes `nix-build -A pkgsMusl.hare` as well as cross-compilation
of hare programs for musl users, e.g.
`nix-build -A pkgsMusl.pkgsCross.aarch64-multiplatform-musl.bonsai`.
2026-05-01 22:16:20 +00:00
Nikolay Korotkiy
c289229c6b hare: 0.24.2 → 0.26.0, adopt 2026-03-01 16:14:03 +04:00
Wolfgang Walther
c319ac6571 various: fix eval
runCommandNoCC has been renamed to runCommand and the former has
recently been turned into a throw.
2025-10-28 18:17:14 +01:00
Coutinho de Souza
d886932fdb maintainers: remove onemoresuza from hare, harec and haredoc 2025-10-20 16:42:39 -04: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
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Wolfgang Walther
bd06437b4d hare: fix eval without enableCrossCompilation
In a `a -> b` construct, when the first condition `a` doesn't apply, the
overall result will be `true` - but this immediately fired the `throw`
in these cases. Thus `enableCrossCompilation = false` resulted in
immediate eval errors.

This also fixes eval for CI on darwin, where the assert should not
trigger, but instead let `meta.badPlatforms` be evaluated. This then
throws an "unsupported system" error, which can be caught properly by
CI.
2025-07-21 18:00:08 +02:00
Wolfgang Walther
b12e9707e0 treewide: replace substituteAll with replaceVars (part 3)
Driving #237216 forward.
2025-01-19 13:31:23 +01:00
Yueh-Shun Li
21c0129841 treewide: handle prePhases __structuredAttrs-agnostically
Always specify the prePhases attribute as a list instead of a string.

Append elements to the prePhases Bash variable using appendToVar
instead of string or Bash array concatenation.
2024-09-03 05:33:59 +08:00
Coutinho de Souza
8cd47cdd7d hare: use _experimental-update-script-combinators 2024-08-09 10:09:46 -03:00
Coutinho de Souza
606cfb42f1 hare: refactor cross-compilation tests
Now it does test for cross-compilation.
2024-07-17 11:53:22 -03:00
Coutinho de Souza
c56755b92a hare: 0.24.0 -> 0.24.2
Also set the correct index for mailcap patch and change harec and qbe
binaries replacement for a more explicit placeholder.
2024-07-16 08:14:02 -03:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
Coutinho de Souza
b0fcfa88cf hareHook: init
Co-authored-by: Colin <colin@uninsane.org>
2024-06-04 20:32:51 -03:00
Coutinho de Souza
3297bf3ba6 harec: expose qbe through passthru
harec and hare should always have the same qbe package. By exposing the
latter under harec's passthru attribute and using it as hare's qbe, we
assure that they will always hare the same qbe package even if there's a
need for a local overlay.
2024-06-04 20:27:52 -03:00
Coutinho de Souza
e9ee0ff4b0 hare: fix mime module
The mime module relies on the `/etc/mime.types` file. We may hardcode it
like the Golang recipe[0].

Also add a `passthru.tests.mimeModule` so that we can be certain that
the module is working.

[0]: f1010e0469/pkgs/development/compilers/go/1.22.nix (L79)
2024-05-21 17:11:47 -03:00
Coutinho de Souza
0801041b52 hare: remove shell wrapping overhead
Hardcode qbe and harec to avoid the overhead of wrapping hare with a
bash script.

By doing that, we also had to change how `makeFlags` were defined: Now
only part of the `<ARCH>_<TOOL>` make variables are conditioned to the
enableCrossCompilation. The ones belonging to the build platform are
passed unconditionally.

Add qbe and harec to propagatedBuildInputs.

Some build frameworks may rely on having harec and qbe available on
PATH by setting `HAREC` and `QBE` to relative paths --- e. g., `haredo`.
2024-05-16 10:14:14 -03:00
Coutinho de Souza
476b34c50b hare: fix x86_64 make flags and remove CC
Remove `CC` since it is not used.

Capitalize x86_64 (from `x86_64` to `X86_64`) to embed their values on
the binary.

Patch the `hare` command so that it has the `-v` option for the
`version` subcommand. With it, is much easier to check the paths of the
toolchains, since we do not need to rely on:
`strings <path-to-hare-binary> | grep <toolchain-path>`
2024-05-14 11:56:31 -03:00
Coutinho de Souza
4876a6883f hare: format with nixfmt-rfc-style 2024-05-14 11:56:31 -03:00
Coutinho de Souza
8100cc1f54 hare: enable cross-compilation 2024-03-06 10:41:04 -03:00
Coutinho de Souza
b2aa275555 hare: unstable-2024-02-08 -> 0.24.0
Drop usage of pinned qbe in favor of qbe-1.2.
2024-02-21 16:36:41 -03:00
Sandro
7dac69a0d9 Merge pull request #287481 from onemoresuza/hare
hare: remove `passthru.updateScript` from it and harec
2024-02-10 17:52:12 +01:00
R. Ryantm
eed453c0a9 hare: unstable-2024-02-05 -> unstable-2024-02-08 2024-02-09 19:45:05 +00:00
Gustavo Coutinho de Souza
64a7c978a5 hare: remove passthru.updateScript from it and harec
Since it must be updated together with `harec`, the r-ryantm update
workflow does not work, since it creates two different PRs.
2024-02-09 09:47:40 -03:00
R. Ryantm
f0fd731145 hare: 0-unstable-2024-02-01 -> unstable-2024-02-05 2024-02-06 06:25:26 +00:00
Gustavo Coutinho de Souza
7b9a168c35 hare: unstable-2023-11-27 -> 0-unstable-2024-02-01
Enable new debuggin features described on Hare's blog[0].

[0]: https://harelang.org/blog/2024-02-01-debugging-features/
2024-02-05 08:26:47 -03:00
Gustavo Coutinho de Souza
3ff0cd7263 hare: embedd paths for cross-compilation toolchains
Also strip the `HAREPATH` make variable embedded in the binary from
empty `$(SRCDIR)/hare/third-party`, since since nix does not follows the
FHS and relies on the `HAREPATH` environment variable to find third
party libraries.
2024-01-17 13:31:00 -03:00
Gustavo Coutinho de Souza
a47d6e0fd6 hare: unstable-2023-10-23 -> unstable-2023-11-27
And also:
- move platform and arch to outer let-in
- patch tzdata paths to use the nix store
- set `outputs` to `[ "out" "man" ]`
- append `nixpkgs` `hare version`'s output
- compact `postFixup` phase
- rework description
- move `binutils-unwrapped` only to `buildInputs`

[1]: https://nixpk.gs/pr-tracker.html?pr=265124
2023-12-14 19:27:37 -03:00
Gustavo Coutinho de Souza
5ee6ca0458 hare: migrate to pkgs/by-name 2023-12-11 16:27:55 -03:00