1{
2 lib,
3 stdenv,
4 fetchurl,
5 fetchpatch,
6}:
7
8stdenv.mkDerivation rec {
9 version = "0.99";
10 pname = "barcode";
11 src = fetchurl {
12 url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
13 sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8";
14 };
15 patches = [
16 # Pull upstream patch for -fno-common toolchains.
17 (fetchpatch {
18 name = "fno-common.patch";
19 url = "http://git.savannah.gnu.org/cgit/barcode.git/patch/?id=4654f68706a459c9602d9932b56a56e8930f7d53";
20 sha256 = "15kclzcwlh0ymr7m48vc0m8z98q0wf4xbfcky4g1y8yvvpvvrfgc";
21 })
22 ];
23
24 configureFlags = lib.optional stdenv.hostPlatform.isDarwin "ac_cv_func_calloc_0_nonnull=yes";
25
26 hardeningDisable = [ "format" ];
27
28 meta = with lib; {
29 description = "GNU barcode generator";
30 maintainers = with maintainers; [ raskin ];
31 platforms = platforms.unix;
32 downloadPage = "https://ftp.gnu.org/gnu/barcode/";
33 homepage = "https://www.gnu.org/software/barcode/";
34 license = licenses.gpl3;
35 };
36}