nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 makeWrapper,
8 perlPackages,
9 libminc,
10 octave,
11 coreutils,
12 minc_tools,
13}:
14
15stdenv.mkDerivation {
16 pname = "minc-widgets";
17 version = "unstable-2016-04-20";
18
19 src = fetchFromGitHub {
20 owner = "BIC-MNI";
21 repo = "minc-widgets";
22 rev = "f08b643894c81a1a2e0fbfe595a17a42ba8906db";
23 sha256 = "1b9g6lf37wpp211ikaji4rf74rl9xcmrlyqcw1zq3z12ji9y33bm";
24 };
25
26 patches = [
27 (fetchpatch {
28 name = "cmake4-fix.patch";
29 url = "https://github.com/BIC-MNI/minc-widgets/commit/9f5bc1996d2f9b4702efdb010834e2c7f1e3fbf1.patch";
30 hash = "sha256-qqMKbxQS+HTRQaOP2DH/m8Z3DqoCMGLFp1AEKaQ6l5s=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 cmake
36 makeWrapper
37 ];
38 buildInputs = [ libminc ];
39 propagatedBuildInputs =
40 (with perlPackages; [
41 perl
42 GetoptTabular
43 MNI-Perllib
44 ])
45 ++ [
46 octave
47 coreutils
48 minc_tools
49 ];
50
51 postFixup = ''
52 for p in $out/bin/*; do
53 wrapProgram $p --prefix PERL5LIB : $PERL5LIB --set PATH "${
54 lib.makeBinPath [
55 coreutils
56 minc_tools
57 ]
58 }";
59 done
60 '';
61
62 meta = {
63 homepage = "https://github.com/BIC-MNI/minc-widgets";
64 description = "Collection of Perl and shell scripts for processing MINC files";
65 maintainers = with lib.maintainers; [ bcdarwin ];
66 platforms = lib.platforms.unix;
67 license = lib.licenses.free;
68 };
69}