forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
34 lines
875 B
Nix
34 lines
875 B
Nix
{ lib, stdenv, fetchurl, autoreconfHook, flex, bison, texinfo, help2man, m4 }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "flex-2.5.35";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/westes/flex/archive/flex-2-5-35.tar.gz";
|
|
sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs tests
|
|
'';
|
|
|
|
nativeBuildInputs = [ flex bison texinfo help2man autoreconfHook ];
|
|
|
|
propagatedBuildInputs = [ m4 ];
|
|
|
|
preConfigure = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
];
|
|
|
|
doCheck = false; # fails 2 out of 46 tests
|
|
|
|
meta = with lib; {
|
|
branch = "2.5.35";
|
|
homepage = "http://flex.sourceforge.net/";
|
|
description = "A fast lexical analyser generator";
|
|
license = licenses.bsd2;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|