python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / networking / nettee / default.nix
blobc5cbcb19a971b0d2e89a74b27fa10e36a926b098
1 { stdenv, lib, fetchurl, cleanPackaging }:
3 let
4   version = "0.3.4";
5   sha256 = "00xbkp99x9v07r34w7m2p8gak5hdsdbka36n7a733rdrrkgf5z7r";
7 in stdenv.mkDerivation {
8   pname = "nettee";
9   inherit version;
11   src = fetchurl {
12     url = "http://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/beta-nettee-${version}.tar.gz";
13     inherit sha256;
14   };
16   meta = {
17     homepage = "http://saf.bio.caltech.edu/nettee.html";
18     description = ''Network "tee" program'';
19     license = lib.licenses.gpl2;
20     maintainers = with lib.maintainers; [ Profpatsch ];
21     platforms = lib.platforms.linux;
22   };
24   outputs = [ "bin" "man" "doc" "out" ];
26   patchPhase = ''
27     # h_addr field was removed
28     sed -e '1 i #define h_addr h_addr_list[0]' \
29         -i nettee.c
30   '';
32   buildPhase = ''
33     cat README.TXT
34     mkdir -p $bin/bin
35     $CC -o $bin/bin/nettee \
36       -Wall -pedantic -std=c99\
37       -D_LARGEFILE64_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE\
38       nettee.c rb.c nio.c
39   '';
41   installPhase = ''
42     ${cleanPackaging.commonFileActions {
43         docFiles = [
44           "*.html"
45           "*.TXT"
46           "LICENSE"
47           "*.sh"
48           "topology.txt"
49           "beowulf.master"
50           "topology_info"
51         ];
52         noiseFiles = [
53           "*.c"
54           "*.h"
55           "nettee"
56         ];
57       }} $doc/share/doc/nettee
59     mkdir -p $man/share/man/{man1,man3}
60     mv nettee.1 $man/share/man/man1
61     mv nettee_cmd.3 $man/share/man/man3
62   '';
64   postFixup = ''
65     ${cleanPackaging.checkForRemainingFiles}
66   '';