forked from Illumina/DRAGMAP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
106 lines (95 loc) · 3.34 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
description = "Fork of DRAGMAP, the first of it's name, merger of PRs, cutter of releases, takeoverer of worlds";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.treefmt-nix.flakeModule
];
flake = {
# TODO Put your original flake attributes here.
};
systems = [
# systems for which you want to build the `perSystem` attributes
"x86_64-linux"
# TODO "aarch64-linux" "x86_64-darwin" "aarch64-darwin"
];
perSystem = {
config,
pkgs,
...
}: {
#
devShells.default = pkgs.mkShell {
packages = with pkgs; [
boost
gnumake
gtest
zlib
];
env = {
BOOST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.boost}/include";
BOOST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.boost}/lib";
GTEST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.gtest}/include";
GTEST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.gtest}/lib";
GTEST_ROOT = "${pkgs.gtest}";
LD_LIBRARY_PATH = "${pkgs.lib.getLib pkgs.gtest}/lib";
LIBCLANG_PATH = "${pkgs.lib.getLib pkgs.llvmPackages.libclang.lib}/lib";
};
};
packages.dragmap = pkgs.stdenv.mkDerivation {
pname = "NARFMAP";
version = "1.4.2";
src = ./.;
buildInputs = [
pkgs.boost
pkgs.gnumake
pkgs.gtest
pkgs.zlib
];
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin
cp build/release/compare $out/bin
cp build/release/dragen-os $out/bin
'';
env = {
HAS_GTEST = 0;
# FIXME nix and static compiling doesn't seem to be working
# STATIC = 1;
BOOST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.boost}/include";
BOOST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.boost}/lib";
GTEST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.gtest}/include";
GTEST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.gtest}/lib";
GTEST_ROOT = "${pkgs.gtest}";
LD_LIBRARY_PATH = "${pkgs.lib.getLib pkgs.gtest}/lib";
LIBCLANG_PATH = "${pkgs.lib.getLib pkgs.llvmPackages.libclang.lib}/lib";
};
meta = with pkgs.lib; {
homepage = "https://github.com/bioinformaticsorphanage/NARFMAP";
description = ''
The Dragen mapper/aligner Open Source Software.
'';
licencse = licenses.gpl3;
platforms = with platforms; linux;
maintainers = [maintainers.edmundmiller];
};
};
treefmt.config = {
projectRootFile = "flake.nix";
programs.alejandra.enable = true;
programs.clang-format.enable = true;
programs.deadnix.enable = true;
programs.prettier.enable = true;
programs.prettier.settings = {
editorconfig = true;
embeddedLanguageFormatting = "auto";
};
};
};
};
}