93 Commits

Author SHA1 Message Date
Martin Weinelt b01149720f file: relax landlock sandboxing for tar.bz2 compat
The new landlock sandbox does not allow executing any programs under /,
which prevents it from executing the bzip2 helper to determine the
correct mime type response.

```
$ touch foo
$ tar -cjf foo.tar.bz2 foo
$ file --brief --mime --uncompress foo.tar.bz2
application/x-decompression-error-bzip2-Cannot-posix-spawn--bzip2---Permission-denied compressed-encoding=application/x-bzip2; charset=binary`
```
2026-07-11 14:59:58 +02:00
Adam Thompson-Sharpe d76fd9e7e8 file: 5.47 -> 5.48
The patches that were required for v5.47 are now part of the v5.48
release.

Changelog: <https://github.com/file/file/compare/FILE5_47...FILE5_48>
2026-06-10 21:39:12 -04:00
OPNA2608 ddf69fce53 file: Apply patches to fix GUID parsing on big-endian 2026-05-30 20:17:03 +02:00
Michael Daniels 501aab04c3 file: add patches
Fixes https://github.com/NixOS/nixpkgs/pull/514964#issuecomment-4367185856
2026-05-06 17:58:08 -04:00
Adam Thompson-Sharpe 8281160d15 file: 5.45 -> 5.47
The bugs that prevented upgrading to v5.46 have been fixed in the latest
version.
2026-05-01 13:32:42 -04:00
David McFarland 93d523cb03 file: fix cross build for windows platforms
This should be a more general fix than the original windows one.  This
is needed because upstream uses `EXEEXT` for build stuff:

    # FIXME: Build file natively as well so that it can be used to compile
    # the target's magic file; for now we bail if the local version does not
    match
    if IS_CROSS_COMPILE
    FILE_COMPILE = file${EXEEXT}
    FILE_COMPILE_DEP =
    else
    FILE_COMPILE = $(top_builddir)/src/file${EXEEXT}
    FILE_COMPILE_DEP = $(FILE_COMPILE)
    endif
2026-01-05 11:44:39 -04: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
Ross Smyth ceb75e0f40 treewide: Gate libgnurx behind 'isMinGW' 2025-08-01 11:45:23 -04:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Doron Behar 86def463e2 file: Add another comment regarding 5.46 issues 2025-05-29 17:40:40 +03:00
Doron Behar 7377f9e6ad Revert "file: 5.45 -> 5.46", to fix Zip files regressions
This reverts commit 75d2d3c292, after
multiple complains best summarized here:

https://github.com/NixOS/nixpkgs/pull/402318#issuecomment-2881163359
2025-05-16 10:29:43 +03:00
Silvan Mosberger 667d42c00d 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 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Sergei Trofimovich 75d2d3c292 file: 5.45 -> 5.46
Changes: https://github.com/file/file/compare/FILE5_45...FILE5_46
2024-11-29 06:35:51 +00:00
éclairevoyant 96031e8dd4 treewide: fix uses of finalAttrs.pname in urls 2024-07-23 12:48:10 -04:00
Alyssa Ross 3df6bb2c85 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01: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
Audrey Dutcher 846de80d1c various: Enable updateAutotoolsGnuConfigScriptsHook
Prior to August 2023, any config.guess generated by autoconf will
include a hardcoded /usr/bin/uname invocation for FreeBSD on any
architecture other than arm. This clearly doesn't work under nix.
We must then update or otherwise patch each old config.guess.
2024-05-27 11:09:28 -04:00
Meet Barot 8264bd8bf3 file: Add meta.pkgConfigModules and test 2023-10-16 00:36:24 -04:00
Adam Joseph ffe4cde3b7 Merge pull request #247040 from trofi/file-update
file: 5.44 -> 5.45
2023-08-16 04:59:53 +00:00
Sergei Trofimovich f0c74d421c Update pkgs/tools/misc/file/default.nix
Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-08-05 09:09:08 +01:00
Sergei Trofimovich b48e3ae9c2 file: 5.44 -> 5.45
Changes: https://github.com/file/file/compare/FILE5_44...FILE5_45
2023-08-04 17:12:00 +01:00
Robert Hensing 34ee0260ec treewide: Add meta.mainProgram
Based on ofborg feedback.
Part of https://github.com/NixOS/nixpkgs/pull/246386
2023-08-01 12:21:05 +02:00
Sergei Trofimovich e86bbf38ce file: move headers and mans to "dev" and "man" outputs 2023-04-16 07:28:06 +01:00
K900 2e759a9a92 file: backport another regression fix 2023-02-14 21:34:31 +03:00
Alyssa Ross 18d1c014bf file: fix identification of pyzip files 2023-02-09 10:33:18 +00:00
Sandro Jäckel 3487488f62 file: 5.43 -> 5.44 2023-01-22 02:54:16 +01:00
Yureka a45dae19bf file: fix doCheck conditional for pkgsMusl.pkgsCross.gnu64 2022-10-29 08:48:30 +02:00
Alyssa Ross c41353b28d file: disable tests on musl
Fixes: 4c510f32fe ("file: 5.42 -> 5.43")
2022-09-19 16:20:20 +00:00
zowoq 4c510f32fe file: 5.42 -> 5.43
https://mailman.astron.com/pipermail/file/2022-September/000857.html
2022-09-15 06:20:07 +10:00
zowoq 6adaaf8d8e file: 5.41 -> 5.42 (#177347) 2022-06-12 11:21:30 +00:00
Adam Joseph 860c2a1d95 pkgs/tools/misc/file: add cannot-use-fetchpatch warning
As requested here: https://github.com/NixOS/nixpkgs/pull/168413#pullrequestreview-988550409
2022-05-29 22:30:38 +02:00
Artturin 1d44ac176c treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same
when enableParallelBuildingByDefault is enabled

verified with
`nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
2022-05-25 16:03:14 +03:00
Artturin f002ffed9a treewide: enable strictDeps in bootstrap packages 2022-05-22 16:40:26 +03:00
Doron Behar 956e2c2475 file: Add @doronbehar as maintainer 2021-10-23 10:24:58 +03:00
Doron Behar 12e8c58987 file: 5.40 -> 5.41 2021-10-21 15:47:01 +03:00
github-actions[bot] cfc792e193 Merge staging-next into staging 2021-08-07 12:02:05 +00:00
marius851000 04d50d249f file: fix detection of mimetype of xz files (#132809) 2021-08-06 06:45:31 -04:00
Sandro Jäckel 55395e2130 file: format 2021-08-06 10:23:23 +02:00
Kid 5a4a561f8b file: 5.39 -> 5.40 2021-07-24 15:22:54 +02:00
Ben Siraphob 8c5d37129f pkgs/tools: stdenv.lib -> lib 2021-01-15 17:12:36 +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
Pierre Bourdon cbb288204d file: backport patch to fix a 5.39 regression
This bug is causing diffoscope to fail to build with file 5.39.
2020-06-28 11:18:38 +02:00
R. RyanTM 0d60bd97b0 file: 5.38 -> 5.39 2020-06-19 10:57:08 +02:00
Michael Reilly 84cf00f980 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
zowoq 25fb1a02a3 file: 5.37 -> 5.38 2019-12-31 09:27:18 +01:00
Robin Gloster ecff7d3a56 file: *Flags are lists 2019-12-30 11:13:38 +01:00
Robert Scott 99273fc555 file: add patch for CVE-2019-18218
upstream patch https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84.patch
doesn't apply directly, debian have a version which has been adapted for
5.37.
2019-10-26 18:13:12 +01: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
Will Dietz 7822281b68 file: 5.36 -> 5.37
https://github.com/file/file/blob/FILE5_37/ChangeLog
2019-05-18 08:22:50 +02:00
Will Dietz 7aea4cc094 Revert "Merge #56170: Revert "file: 5.35 -> 5.36" (staging)"
Try this again, seems to work now.

Motivated by new version possibly fixing security issues
described here:

https://github.com/NixOS/nixpkgs/issues/56360

This reverts commit 7d47102bbc, reversing
changes made to 2ed8187107.
2019-02-27 16:45:48 -06:00