80 Commits

Author SHA1 Message Date
Linus Vettiger ec442deb85 flex_2_5_35: Fix build on darwin 2026-05-16 14:29:08 +02:00
zowoq c379995bb3 flex: unconditionally apply patch 2026-01-02 22:08:56 +10:00
Charlotte 🦝 Deleńkec a3c97b5a84 flex: fix cross-compile with gcc 15
flex’s malloc forward-definition was using old syntax no longer
supported by C23. This definition was seemingly only used when
cross-compiling flex
2025-12-31 14:35:09 +01: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
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
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
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
Ferry Jérémie 65d7e87fdb treewide: replace http by https when https is a permanent redirection 2023-01-22 02:46:49 +01:00
Dr Perceptron 946f5dd980 flex: backwards-compatible executable alias lex 2022-01-16 16:07:09 +11:00
Sergei Trofimovich 6c74a8a08f flex: use fetchuril instead of fetchpatch to avoid extra depends
Weekly `gcc` snapshots don't come with pre-generated `flex` lexers
and thus require `flex` dependency. Attempt to use them as is fails as:

    error: anonymous function at pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'meta'
       at pkgs/build-support/fetchpatch/default.nix:18:1:
           17| in
           18| fetchurl ({
             | ^
           19|   postFetch = ''
    (use '--show-trace' to show detailed location information)

This happens due to a circulare dependency between fetchpatch dependencies
and flex.

The change uses simpler `fetchurl` to ease use of `flex` in `gcc`.

This allows me to use existing `gcc` `.nix` files for weekly `gcc`
snapshots by only adding extra `flex` dependency.
2021-12-03 07:56:28 +00:00
Alyssa Ross 4e1852096f Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/development/tools/parsing/flex/2.6.1.nix
2021-11-14 14:17:46 +00:00
Sandro Jäckel 792680167b flex: delete unreferenced file 2021-11-13 19:45:02 +01:00
Felix Buehler 345d71ffd0 pkgs/development: rename name to pname&version 2021-11-10 14:03:21 +01:00
Sebastián Mancilla 8f94a33b38 treewide: ensure pre/post phase hooks are strings
Some derivations use lib.optional or lib.optionals when setting pre/post
phase hooks. Ensure the proper lib.optionalString is used.
2021-08-20 19:08:42 -04:00
Andrew Childs 9ad03b1ed9 flex: fix cross compilation 2021-05-17 00:27:00 +09:00
Ben Siraphob c522fec274 pkgs/development/tools: stdenv.lib -> lib 2021-01-23 20:30:03 +07:00
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Michael Reilly 84cf00f980 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Vladimír Čunát 14aa936ec5 Merge branch 'staging-next' into staging 2018-08-17 20:53:27 +02:00
Vladimír Čunát cbabebcc2e Merge branch 'master' into staging-next
Hydra: ?compare=1473892
2018-08-17 13:45:21 +02:00
Markus Kowalewski f9a1aef084 flex: add license 2018-08-16 21:51:07 +02:00
Jan Malakhovski 65b4ff488b flex_2_5_35: make tests run, but disable 2018-08-11 09:35:29 +00:00
Jan Malakhovski d3b15144a7 flex, flex_2_6_1: fix tests 2018-08-11 09:35:22 +00:00
John Ericson 25348b27c5 flex: Clean up to use less bash 2018-08-02 15:12:45 -04:00
John Ericson 1833a04aed flex: Don't use crossAttrs 2018-07-24 19:40:46 -04:00
Will Dietz cafe25224f flex: review feedback
* top-level attributes, not crossAttrs
* use depsBuildBuild
2018-01-22 18:44:42 -06:00
Will Dietz 67be78f129 flex: patch around attempt to regen manpage, fix cross 2018-01-22 16:51:31 -06:00
Ben Gamari 715fcb4266 flex: Don't disable static while cross-compiling flex
linux-pam appears to rely on this while cross-compiling.

(cherry picked from commit 4009dd163ac30cd25833bf7eb19b5e26e75c474f)
2018-01-22 16:51:30 -06:00
Ben Gamari e6f9e82ee4 flex: Use native dependencies where applicable
Flex needs both a C compiler for the build environment, as well as a native m4.

(cherry picked from commit 81827c0084c1a69e41894a4d38b0c0b267eaff34)
2018-01-22 16:51:30 -06:00
Vladimír Čunát 3562c2cfa7 flex: add notes about the glibc-2.26 patch 2017-11-06 19:25:14 +01:00
Vladimír Čunát 6535f0bca6 flex: fix with glibc-2.26
It caused segfaults, e.g. when building doxygen.
2017-11-06 19:20:21 +01:00
John Ericson 252b36a28d misc pkgs: Recategorize some dependencies 2017-09-05 11:37:10 -04:00
Frederik Rietdijk 740d76371e Merge commit 'ba68231273bea4cba01413fd2a0e56d68db9234c' into HEAD 2017-07-31 09:12:15 +02:00
Vladimír Čunát 25c762f2bc flex-2.5.35: switch source URL 2017-07-30 09:46:13 +02:00
Franz Pletz 5e08c4a2cd flex: 2.6.3 -> 2.6.4 2017-07-29 19:51:15 +02:00
volth d50437ba3e flex_2_5_35: fix 404 2017-07-29 19:01:07 +02:00
Vladimír Čunát cf1d3677d3 flex: bring back 2.6.1 as an option
Some breakages after flex update aren't so easy to fix,
and I can't really afford to spend much time on it ATM.
2017-01-06 16:17:46 +01:00
Vladimír Čunát 6bded45883 flex: 2.6.1 -> 2.6.3
This resolves some warnings and errors introduced in 2.6.x.
2016-12-30 23:17:08 +01:00
Graham Christensen feec685636 flex: 2.6.0 -> 2.6.1 2016-09-23 21:42:08 -04:00
Tuomas Tynkkynen 21f17d69f6 treewide: Add lots of meta.platforms
Build-tested on x86_64 Linux & Mac.
2016-08-02 21:42:43 +03:00
Adam Boseley e3068d7309 flex: disable tests when cross compiling
When cross compiling we can't run the test executables
on the build machine
2015-12-23 21:05:32 +10:00
William A. Kennington III 22bf2d0bf3 flex: 2.5.39 -> 2.6.0 2015-11-18 17:50:27 -08:00
Rok Garbas 9e99a66c24 cygwin: make flex building on cygwin 2015-06-05 00:39:29 +02:00
Evgeny Egorochkin 08cb717c98 add meta.branch 2014-11-03 13:09:48 +02:00
John Wiegley bc08fa99f1 Fix flex for building on darwin systems 2014-04-15 05:04:27 -05:00
Peter Simons f741be954c Offer consistently named attributes for the two available flex versions. 2014-04-11 10:06:18 +02:00