21 Commits

Author SHA1 Message Date
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +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 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
Sigmanificient 63d05d989e pkgs/development: remove unused arguments 2024-08-03 17:18:20 +02:00
Francois-Rene Rideau 8743ae8765 gambit: tweak support 2023-10-14 18:36:25 -04:00
Francois-Rene Rideau e15380be99 gambit: add tco support 2023-08-06 18:27:26 -04:00
Francois-Rene Rideau 785b7d40eb gambit-unstable: 2020-09-20 -> 2023-07-30 2023-07-30 16:49:11 -04:00
Francois-Rene Rideau d68f7974fa gambit: 4.9.3 -> 4.9.5 2023-07-30 16:49:11 -04:00
Theodore Ni 98bd1d651d gambit: reenable stackprotector on aarch64-darwin
The original error that required disabling the stack protector on
aarch64-darwin has been fixed in GCC.
2022-09-04 10:19:14 -07:00
Alyssa Ross fd78240ac8 treewide: use lib.getLib for OpenSSL libraries
At some point, I'd like to make another attempt at
71f1f4884b ("openssl: stop static binaries referencing libs"), which
was reverted in 195c7da07d.  One problem with my previous attempt is
that I moved OpenSSL's libraries to a lib output, but many dependent
packages were hardcoding the out output as the location of the
libraries.  This patch fixes every such case I could find in the tree.
It won't have any effect immediately, but will mean these packages
will automatically use an OpenSSL lib output if it is reintroduced in
future.

This patch should cause very few rebuilds, because it shouldn't make
any change at all to most packages I'm touching.  The few rebuilds
that are introduced come from when I've changed a package builder not
to use variable names like openssl.out in scripts / substitution
patterns, which would be confusing since they don't hardcode the
output any more.

I started by making the following global replacements:

    ${pkgs.openssl.out}/lib -> ${lib.getLib pkgs.openssl}/lib
    ${openssl.out}/lib -> ${lib.getLib openssl}/lib

Then I removed the ".out" suffix when part of the argument to
lib.makeLibraryPath, since that function uses lib.getLib internally.

Then I fixed up cases where openssl was part of the -L flag to the
compiler/linker, since that unambigously is referring to libraries.

Then I manually investigated and fixed the following packages:

 - pycurl
 - citrix-workspace
 - ppp
 - wraith
 - unbound
 - gambit
 - acl2

I'm reasonably confindent in my fixes for all of them.

For acl2, since the openssl library paths are manually provided above
anyway, I don't think openssl is required separately as a build input
at all.  Removing it doesn't make a difference to the output size, the
file list, or the closure.

I've tested evaluation with the OfBorg meta checks, to protect against
introducing evaluation failures.
2022-03-30 15:10:00 +00:00
AlexKnauth de2e77ec98 gambit: disable stackprotector on aarch64-darwin for now 2021-12-22 10:14:51 -05:00
Jason Felice 3ed996727f gambit: fix compiler paths
Prior to the recent merge, the full paths were specified here, so
gambit would get the full paths and not need to propagate the compiler
inputs.
2021-03-22 10:58:48 -04:00
Ben Siraphob 7273ebabfa gambit: refactor (#113405) 2021-03-09 10:52:26 +01:00
Francois-Rene Rideau 0febc57883 gambit: support targets, modules 2020-11-06 12:03:59 -05:00
Jason Felice 61335d51ac gambit: disable use of poll() on Darwin
Darwin has a bug which affects the use of poll() with a tty fd,
which affects gambit's REPL when at a console, causing 100% CPU
usage.

Gambit recommends this is disabled on Darwin.
2020-05-19 16:06:41 -05:00
Francois-Rene Rideau 9456522528 Refactor Gambit support
Refactor the build rule:
- Put files in $out/gambit instead of $out.
- Make the optimization setting easy to override.
- Make use of gccStdenv more explicit at this level.
- Support new-style runtime options for forcing UTF-8 I/O.
- Override the PACKAGE_VERSION and PACKAGE_STRING with git version.
- Note that the license is lgpl21, not lpgl2 (Note: also dual asl20).
- Try and fail to meaningfully add missing runtimeDeps.
- Build using NIX_BUILD_CORES.
2020-05-17 15:48:12 -04:00
Francois-Rene Rideau 0d422d5007 gambit: set CC to full path, fixes #78921
Use -Os rather than -O2 as our compilation flag, document why.

Document why we always use gcc over clang.

Fix openssl path in gambit.
Stop trying to make static openssl.
2020-02-26 20:37:03 -05:00
volth c814d72b51 treewide: name -> pname 2019-08-17 10:54:38 +00:00
Francois-Rene Rideau bbd4888dc3 gambit: 4.9.0 -> 4.9.1 2018-11-19 18:04:51 -05:00
volth 52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Francois-Rene Rideau d50469adc7 gambit-unstable: init at 2018-03-26 2018-04-04 07:39:48 -04:00