forked from DNA-and-Natural-Algorithms-Group/KinDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
84 lines (68 loc) · 2.21 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
{
description = "Code driving the UWMISL CAS-9 implementation of DNA similarity-search.";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
pypi-deps-db = {
url = github:DavHau/pypi-deps-db;
flake = false;
};
mach-nix = {
url = github:DavHau/mach-nix;
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.pypi-deps-db.follows = "pypi-deps-db";
};
};
outputs = { self, nixpkgs, flake-utils, pypi-deps-db, mach-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pname = "kinda";
version = "0.5";
python_version = "python38";
pkgs = nixpkgs.legacyPackages.${system};
mach-nix-utils = import mach-nix {
inherit pkgs;
pypiDataRev = "90885674ac9a4005ec88b05904dc25b653363ab4";
pypiDataSha256 = "08q5ii3k1p1azix6mwc3dkqc0l4p4md5zbjrdf9f6p3fyxwqk36g";
};
peppercorn = mach-nix-utils.buildPythonPackage rec {
name = "peppercornenumerator";
version = "v0.6.2";
python = python_version;
src = pkgs.fetchFromGitHub {
owner = "DNA-and-Natural-Algorithms-Group";
repo = "peppercornenumerator";
rev = "v0.6.2";
sha256 = "0nmf1hyvn51cf9vkxlar15hpvl0yf9rd1cvg83r51w64kvszmr7r";
};
};
python = mach-nix-utils.mkPython {
python = python_version;
requirements = builtins.readFile ./requirements.txt;
packagesExtra = [
#peppercorn
];
};
customOverrides = self: super: {
# Overrides go here
};
app = mach-nix-utils.buildPythonApplication {
inherit pname version;
# add missing dependencies whenever necessary.
packagesExtra = [
python
];
src = ./.;
};
packageName = "cas9-similarity-search";
in {
packages.${packageName} = app;
defaultPackage = self.packages.${system}.${packageName};
devShell = import ./shell.nix { inherit python; nixpkgs=pkgs; };
});
}