nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 29 lines 860 B view raw
1{ stdenv, fetchurl, file, zlib, libgnurx }: 2 3stdenv.mkDerivation rec { 4 pname = "file"; 5 version = "5.38"; 6 7 src = fetchurl { 8 urls = [ 9 "ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz" 10 "https://distfiles.macports.org/file/${pname}-${version}.tar.gz" 11 ]; 12 sha256 = "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r"; 13 }; 14 15 nativeBuildInputs = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file; 16 buildInputs = [ zlib ] 17 ++ stdenv.lib.optional stdenv.hostPlatform.isWindows libgnurx; 18 19 doCheck = true; 20 21 makeFlags = stdenv.lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file"; 22 23 meta = with stdenv.lib; { 24 homepage = https://darwinsys.com/file; 25 description = "A program that shows the type of files"; 26 license = licenses.bsd2; 27 platforms = platforms.all; 28 }; 29}