nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 2.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 m4, 6 perl, 7 help2man, 8}: 9 10# Note: this package is used for bootstrapping fetchurl, and thus 11# cannot use fetchpatch! All mutable patches (generated by GitHub or 12# cgit) that are needed here should be included directly in Nixpkgs as 13# files. 14 15stdenv.mkDerivation rec { 16 pname = "bison"; 17 version = "3.8.2"; # Check the note above doInstallCheck before updating. 18 19 src = fetchurl { 20 url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; 21 sha256 = "sha256-BsnhO99+sk1M62tZIFpPZ8LH5yExGWREMP6C+9FKCrs="; 22 }; 23 24 # gnulib relies on --host= to detect iconv() features on musl(). 25 # Otherwise tests fail due to incorrect unicode symbol oconversion. 26 configurePlatforms = [ 27 "build" 28 "host" 29 ]; 30 31 # there's a /bin/sh shebang in bin/yacc which when no strictDeps is patched with the build stdenv shell 32 # however when cross-compiling it would still be patched with the build stdenv shell which would be wrong 33 # cannot add bash to buildInputs due to infinite recursion 34 strictDeps = stdenv.hostPlatform != stdenv.buildPlatform; 35 36 nativeBuildInputs = [ 37 m4 38 perl 39 ] 40 ++ lib.optional stdenv.hostPlatform.isSunOS help2man; 41 propagatedBuildInputs = [ m4 ]; 42 43 enableParallelBuilding = true; 44 # tests are flaky / timing sensitive on FreeBSD 45 enableParallelChecking = !stdenv.hostPlatform.isFreeBSD; 46 47 # Normal check and install check largely execute the same test suite 48 doCheck = false; 49 # Tests were disabled on LLVM/Darwin due to https://github.com/NixOS/nixpkgs/issues/463659 50 # TODO: enable doInstallCheck unconditionally when fixed upstream. 51 doInstallCheck = !stdenv.cc.isClang; 52 53 meta = { 54 homepage = "https://www.gnu.org/software/bison/"; 55 description = "Yacc-compatible parser generator"; 56 license = lib.licenses.gpl3Plus; 57 58 longDescription = '' 59 Bison is a general-purpose parser generator that converts an 60 annotated context-free grammar into an LALR(1) or GLR parser for 61 that grammar. Once you are proficient with Bison, you can use 62 it to develop a wide range of language parsers, from those used 63 in simple desk calculators to complex programming languages. 64 65 Bison is upward compatible with Yacc: all properly-written Yacc 66 grammars ought to work with Bison with no change. Anyone 67 familiar with Yacc should be able to use Bison with little 68 trouble. You need to be fluent in C or C++ programming in order 69 to use Bison. 70 ''; 71 72 platforms = lib.platforms.unix; 73 }; 74}