Commit Graph

59 Commits

Author SHA1 Message Date
Mathew Polzin
f0324a4ff6 idris2Packages.pack: 2025-11-06 -> 2025-12-27
Update pack to get a fix for an issue that affected Nix installs. The
issue is described by- and fixed by the following PR against the pack
project: https://github.com/stefan-hoeck/idris2-pack/pull/372
2025-12-27 21:38:30 -06:00
Mathew Polzin
8f88d57525 idris2Packages.pack: add make runtime dependency 2025-12-24 10:56:55 -06:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
MithicSpirit
ab10b4da90 idris2Packages.pack: 2024-02-07 -> 2025-11-06
Now that the compiler is updated, we can also update pack. This
introduces several dependency changes, and a more scaleable solution
for handling these will be necessary in the future.
2025-11-09 15:30:14 -05:00
Mathew Polzin
da61fd1916 idris2Packages.idris2Lsp: 2024-01-21 -> 2025-09-10 2025-11-02 17:26:41 -06:00
Ross Smyth
4290359712 idris2: Put prelude in seperate derivation 2025-10-21 12:47:02 -04:00
Ross Smyth
fa2c3ecdc4 idris2: Make a compiler pkgset 2025-10-21 12:45:50 -04:00
Ross Smyth
103a616068 idris2: Modernize derivation 2025-10-21 12:45:50 -04:00
Ross Smyth
8496210f3d idris2: Move to by-name 2025-10-21 12:45:50 -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
mivorasu
ee0866bddd treewide: conform descriptions to the standards 2025-07-28 04:39:00 +00:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Winter
a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
Pol Dellaiera
65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02:00
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
Mathew Polzin
1eb4ffeb43 idris2Packages.buildIdris: add retroactive support for building a whole dependency tree with source (#351520) 2025-01-22 10:14:39 -06:00
Mathew Polzin
f1beac4cd1 idris2Packages.pack: fix runtime building of Idris2 versions 2024-12-06 17:49:20 -06:00
Mathew Polzin
8079c8bd6d idris2Packages.buildIdris: add retroactive support for building a whole dependency tree with source 2024-10-26 15:40:52 -05:00
Mathew Polzin
9b8bdbfa9d idris2Packages.pack: init at 2024-02-07 (#344109) 2024-10-20 11:20:25 -05: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
Mathew Polzin
8ed82c62be idris2Packages.pack: init at 2024-02-07 2024-09-24 09:06:11 -05:00
Mathew Polzin
fffc206f46 idris2Packages: make idris2Api a more formal package 2024-09-13 03:39:02 -05:00
Mathew Polzin
90d67c3e4f idris2Packages.buildIdris: QoL improvements
- use binary wrapper
- put environment variable into env attribute
- support adding attributes to passthru
2024-09-13 03:35:29 -05:00
Mathew Polzin
43f5fc8e72 idris2: add buildIdris tests 2024-09-13 03:35:29 -05:00
Mathew Polzin
b09ba65a43 idris2Packages: run nixfmt 2024-09-13 03:35:23 -05:00
Stefan Frijters
96cc7aa0ba idris2Packages.idris2Lsp: fix cross eval 2024-09-05 17:10:53 +02:00
Mathew Polzin
84cde749e6 idris2Packages.idris2Lsp: apply ergonomics improvements facilitated by latest buildIdris changes 2024-06-23 11:24:29 -05:00
Mathew Polzin
85c18bcd36 idris2Packages.buildIdris: More lenient and ergonomic dependency inputs 2024-06-23 11:22:40 -05: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
Fabián Heredia Montiel
cc6431d559 Merge pull request #297348 from mattpolzin/idris2-prefer-chez-10
idris2: prefer chez 10 over chez-racket
2024-05-09 13:13:33 -06:00
Mathew Polzin
8273075e61 idris2Packages.buildIdris: better nix-shell support via shellHook 2024-03-29 09:29:08 -05:00
Mathew Polzin
b46cee679f idris2: prefer chez 10 over chez-racket 2024-03-19 17:05:34 -05:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
Fabián Heredia Montiel
d7e7fc9008 Merge pull request #293813 from mattpolzin/propagate-idris2-libs
idris2Packages.buildIdris: propagate idris libraries
2024-03-12 09:08:08 -06:00
Mathew Polzin
8082302cfa idris2Packages.idris2Lsp: Add metadata to derivation 2024-03-09 15:09:58 -06:00
Mathew Polzin
a0a7314433 idris2Packages.buildIdris: propagate idris libraries 2024-03-06 10:00:23 -06:00
Mathew Polzin
e9fa40dccd idris2Packages.idris2Lsp: init at 2024-01-21 2024-01-23 23:18:34 -06:00
Mathew Polzin
5fe69cb9cf idris2Packages.buildIdris: better packaging ergonomics, better executable support 2024-01-23 23:05:29 -06:00
Mathew Polzin
f3c916f909 idris2: add mattpolzin as a maintainer 2024-01-15 18:20:58 -06:00
Mathew Polzin
d7a058e6f7 idris2: add api package and buildIdris helper 2024-01-15 18:19:52 -06:00
Mathew Polzin
e09aaf7b55 idris2: 0.6.0 -> 0.7.0 2023-12-22 10:02:10 -06:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Erlend Hamberg
4f4a4eae8c idris2: 0.5.1 -> 0.6.0 2022-10-28 16:27:38 +02:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
wchresta
205b0f2c5e Idris2: Refactor default.nix
We take the idris2 projects version of the derivation. Originally,
Idris2 did not maintain their own nix derivation, so we created our
own. Now they maintain their own derivation, so we should try to
keep ours as close to theirs.

This change comes with the following differences:
* support files are in its own output, instead of packaged with idris2
  - This makes it necessary to provide --package for contrib and network
    !!! This is a breaking change !!!
* IDIRS2_PREFIX is set to ~/.idris2 instead of pointing to nix-store
  - This makes --install work as expected for the user
* Properly set IDRIS2_PACKAGE_PATH
* non-linux platform uses chez-racket instead of chez
2022-01-10 22:01:42 +01:00
wchresta
7389893ebf idris2: add package tests
We had some bugs because simple compilation / execution cases
failed. This adds some very simple package tests that should
help us find these.
2021-12-23 18:25:24 +01:00
cherryblossom000
cc9186270a idris2: use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH on macOS
macOS uses `DYLD_LIBRARY_PATH` instead of `LD_LIBRARY_PATH`.
2021-12-13 22:18:43 +11:00
R. RyanTM
896ee5ffc6 idris2: 0.5.0 -> 0.5.1 2021-09-23 00:16:08 +00:00
R. RyanTM
948ef8a6c5 idris2: 0.4.0 -> 0.5.0 2021-09-19 08:30:18 +00:00
Fabián Heredia Montiel
37d73021ee idris2: fix packagePaths issue
packagePaths changed between idris2 `v0.3.0` and `v0.4.0` and now
includes a version number in the path.

Fixes nixos/nixpkgs#130310

Co-authored-by: zseri <zseri.devel@ytrizja.de>
Co-authored-by: Mario Rodas <marsam@users.noreply.github.com>
2021-07-15 21:50:33 -05:00