nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 43 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "libowfat"; 9 version = "0.34"; 10 11 src = fetchurl { 12 url = "https://www.fefe.de/libowfat/${pname}-${version}.tar.xz"; 13 sha256 = "sha256-1DMNNzrJWBs5e8JKIq0ff11Yp/422dI5/jUs7/xdMEs="; 14 }; 15 16 # Fix for glibc 2.34 from Gentoo 17 # https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=914a4aa87415dabfe77181a2365766417a5919a4 18 postPatch = '' 19 # do not define "__pure__", this the gcc builtin (bug #806505) 20 sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die 21 sed 's#__pure__$#__attrib__pure__#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die 22 # remove unneeded definition of __deprecated__ 23 sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die 24 ''; 25 preBuild = '' 26 make headers 27 ''; 28 29 makeFlags = [ 30 "prefix=$(out)" 31 "CC=${stdenv.cc.targetPrefix}cc" 32 ]; 33 enableParallelBuilding = true; 34 35 meta = with lib; { 36 description = "GPL reimplementation of libdjb"; 37 homepage = "https://www.fefe.de/libowfat/"; 38 license = licenses.gpl2; 39 platforms = platforms.linux; 40 # build tool "json" is built for the host platform 41 broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform; 42 }; 43}