···1-{ lib, stdenv, fetchurl, file, zlib, libgnurx }:
0023# Note: this package is used for bootstrapping fetchurl, and thus
4# cannot use fetchpatch! All mutable patches (generated by GitHub or
5# cgit) that are needed here should be included directly in Nixpkgs as
6# files.
78-stdenv.mkDerivation rec {
9 pname = "file";
10 version = "5.45";
1112 src = fetchurl {
13 urls = [
14- "https://astron.com/pub/file/${pname}-${version}.tar.gz"
15- "https://distfiles.macports.org/file/${pname}-${version}.tar.gz"
16 ];
17 hash = "sha256-/Jf1ECm7DiyfTjv/79r2ePDgOe6HK53lwAKm0Jx4TYI=";
18 };
···3738 makeFlags = lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file";
390040 meta = with lib; {
41 homepage = "https://darwinsys.com/file";
42 description = "A program that shows the type of files";
43 maintainers = with maintainers; [ doronbehar ];
44 license = licenses.bsd2;
045 platforms = platforms.all;
46 mainProgram = "file";
47 };
48-}
···1+{ lib, stdenv, fetchurl, file, zlib, libgnurx
2+, testers
3+}:
45# Note: this package is used for bootstrapping fetchurl, and thus
6# cannot use fetchpatch! All mutable patches (generated by GitHub or
7# cgit) that are needed here should be included directly in Nixpkgs as
8# files.
910+stdenv.mkDerivation (finalAttrs: {
11 pname = "file";
12 version = "5.45";
1314 src = fetchurl {
15 urls = [
16+ "https://astron.com/pub/file/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"
17+ "https://distfiles.macports.org/file/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"
18 ];
19 hash = "sha256-/Jf1ECm7DiyfTjv/79r2ePDgOe6HK53lwAKm0Jx4TYI=";
20 };
···3940 makeFlags = lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file";
4142+ passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
43+44 meta = with lib; {
45 homepage = "https://darwinsys.com/file";
46 description = "A program that shows the type of files";
47 maintainers = with maintainers; [ doronbehar ];
48 license = licenses.bsd2;
49+ pkgConfigModules = [ "libmagic" ];
50 platforms = platforms.all;
51 mainProgram = "file";
52 };
53+})