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
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, perlPackages, libminc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mni_autoreg";
|
|
version = "unstable-2017-09-22";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "BIC-MNI";
|
|
repo = pname;
|
|
rev = "ab99e29987dc029737785baebf24896ec37a2d76";
|
|
sha256 = "0axl069nv57vmb2wvqq7s9v3bfxwspzmk37bxm4973ai1irgppjq";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
|
buildInputs = [ libminc ];
|
|
propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
|
|
|
|
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" ];
|
|
# testing broken: './minc_wrapper: Permission denied' from Testing/ellipse0.mnc
|
|
|
|
postFixup = ''
|
|
for prog in autocrop mritoself mritotal xfmtool; do
|
|
echo $out/bin/$prog
|
|
wrapProgram $out/bin/$prog --prefix PERL5LIB : $PERL5LIB;
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/BIC-MNI/mni_autoreg";
|
|
description = "Tools for automated registration using the MINC image format";
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
platforms = platforms.unix;
|
|
license = licenses.free;
|
|
};
|
|
}
|