nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 installShellFiles,
6 bison,
7 zlib,
8}:
9
10stdenv.mkDerivation {
11 pname = "bioawk";
12 version = "unstable-2017-09-11";
13
14 src = fetchFromGitHub {
15 owner = "lh3";
16 repo = "bioawk";
17 rev = "fd40150b7c557da45e781a999d372abbc634cc21";
18 hash = "sha256-WWgz96DPP83J45isWkMbgEvOlibq6WefK//ImV6+AU0=";
19 };
20
21 nativeBuildInputs = [
22 bison
23 installShellFiles
24 ];
25
26 buildInputs = [
27 zlib
28 ];
29
30 buildFlags = [
31 "CC=${stdenv.cc.targetPrefix}cc"
32 ];
33
34 installPhase = ''
35 runHook preInstall
36
37 install -Dm755 bioawk -t $out/bin
38 mv awk.1 bioawk.1
39 installManPage bioawk.1
40
41 runHook postInstall
42 '';
43
44 meta = {
45 description = "BWK awk modified for biological data";
46 mainProgram = "bioawk";
47 homepage = "https://github.com/lh3/bioawk";
48 license = lib.licenses.hpnd;
49 maintainers = with lib.maintainers; [ natsukium ];
50 platforms = lib.platforms.unix;
51 };
52}