gnu: file: Fix CVE-2017-1000249.
[jackhill/guix/guix.git] / gnu / packages / file.scm
CommitLineData
f2499672
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
b2363f65 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
f1597427 4;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
f2499672
AE
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
1ffa7090 21(define-module (gnu packages file)
59a43334 22 #:use-module (gnu packages)
f2499672
AE
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
27
28(define-public file
29 (package
f1597427
EF
30 (replacement file/fixed)
31 (name "file")
8c85cb1b 32 (version "5.30")
0253ab39
LC
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "ftp://ftp.astron.com/pub/file/file-"
36 version ".tar.gz"))
37 (sha256
38 (base32
8c85cb1b 39 "057jpcyy8ws7q4s4sm8r1rxb8xycdbng2z4y9i98f094wlr28k39"))))
f2499672 40 (build-system gnu-build-system)
cd2512bf
LC
41
42 ;; When cross-compiling, this package depends upon a native install of
43 ;; itself.
44 (self-native-input? #t)
45
35b9e423 46 (synopsis "File type guesser")
f2499672
AE
47 (description
48 "The file command is a file type guesser, a command-line tool that tells
35b9e423 49you in words what kind of data a file contains. It does not rely on filename
3fd242e0 50extensions to tell you the type of a file, but looks at the actual contents
f2499672
AE
51of the file.")
52 (license bsd-2)
53 (home-page "http://www.darwinsys.com/file/")))
3940c5ca 54
f1597427
EF
55(define file/fixed
56 (package
57 (inherit file)
58 (source (origin
59 (inherit (package-source file))
60 (patches (search-patches "file-CVE-2017-1000249.patch"))))))