nixpkgs/pkgs/applications/science/biology/manta/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

36 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, zlib, python2 }:
stdenv.mkDerivation rec {
pname = "manta";
version = "1.6.0";
src = fetchFromGitHub {
owner = "Illumina";
repo = "manta";
rev = "v${version}";
sha256 = "1711xkcw8rpw9xv3bbm7v1aryjz4r341rkq5255192dg38sgq7w2";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib python2 ];
postFixup = ''
sed -i 's|/usr/bin/env python2|${python2.interpreter}|' $out/lib/python/makeRunScript.py
sed -i 's|/usr/bin/env python|${python2.interpreter}|' $out/lib/python/pyflow/pyflow.py
sed -i 's|/bin/bash|${stdenv.shell}|' $out/lib/python/pyflow/pyflowTaskWrapper.py
'';
doInstallCheck = true;
installCheckPhase = ''
rm $out/lib/python/**/*.pyc
PYTHONPATH=$out/lib/python:$PYTHONPATH python -c 'import makeRunScript'
PYTHONPATH=$out/lib/python/pyflow:$PYTHONPATH python -c 'import pyflowTaskWrapper; import pyflow'
'';
meta = with lib; {
description = "Structural variant caller";
license = licenses.gpl3;
homepage = "https://github.com/Illumina/manta";
maintainers = with maintainers; [ jbedo ];
platforms = platforms.x86_64;
};
}