3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/file/default.nix
Sandro Jäckel 55395e2130
file: format
2021-08-06 10:23:23 +02:00

31 lines
870 B
Nix

{ lib, stdenv, fetchurl, file, zlib, libgnurx }:
stdenv.mkDerivation rec {
pname = "file";
version = "5.40";
src = fetchurl {
urls = [
"ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz"
"https://distfiles.macports.org/file/${pname}-${version}.tar.gz"
];
sha256 = "0myxlpj9gy2diqavx33vq88kpvr1k1bpzsm0d0zmb2hl7ks22wqn";
};
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file;
buildInputs = [ zlib ]
++ lib.optional stdenv.hostPlatform.isWindows libgnurx;
doCheck = true;
makeFlags = lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file";
meta = with lib; {
homepage = "https://darwinsys.com/file";
description = "A program that shows the type of files";
maintainers = with maintainers; [ ];
license = licenses.bsd2;
platforms = platforms.all;
};
}