summaryrefslogtreecommitdiff
path: root/default.nix
blob: c408acd5f17978ccd29c923c010c1d8b127bf6f4 (plain)
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
{ pkgs ? import <nixpkgs> {}
, stdenv ? pkgs.llvmPackages_19.stdenv
, clang-tools ? pkgs.clang-tools_19
}:

let
  forstio = (import ((builtins.fetchGit {
    url = "git@git.keldu.de:forstio/forstio";
    ref = "dev";
  }).outPath + "/default.nix"){
    inherit stdenv;
    inherit clang-tools;
	}).forstio;

	adaptive-cpp-dev = pkgs.callPackage .nix/adaptive-cpp.nix {
		inherit stdenv;
		llvmPackages = pkgs.llvmPackages_19;
		lld = pkgs.lld_19;
	};

	pname = "kel-lbm";
	version = "0.0.2";
in rec {
	lbm = pkgs.callPackage ./.nix/derivation.nix {
		inherit forstio;
		inherit stdenv;
		inherit clang-tools;
	};

	examples = {
		cavity_2d_gpu = pkgs.callPackage ./examples/cavity_2d_gpu/.nix/derivation.nix {
			inherit pname version stdenv forstio adaptive-cpp-dev;
			kel-lbm = lbm;
		};
		
		cavity_2d = pkgs.callPackage ./examples/cavity_2d/.nix/derivation.nix {
			inherit pname version stdenv forstio;
			kel-lbm = lbm;
		};
		
		poiseulle_2d = pkgs.callPackage ./examples/poiseulle_2d/.nix/derivation.nix {
			inherit pname version stdenv forstio;
			kel-lbm = lbm;
		};
		
		poiseulle_3d = pkgs.callPackage ./examples/poiseulle_3d/.nix/derivation.nix {
			inherit pname version stdenv forstio;
			kel-lbm = lbm;
		};

		poiseulle_particles_channel_2d = pkgs.callPackage ./examples/poiseulle_particles_channel_2d/.nix/derivation.nix {
			inherit pname version stdenv forstio;
			kel-lbm = lbm;
		};

		meta_2d = pkgs.callPackage ./examples/meta_2d/.nix/derivation.nix {
			inherit pname version stdenv forstio;
			kel-lbm = lbm;
		};

		planetary_3d = pkgs.callPackage ./examples/planetary_3d/.nix/derivation.nix {
			inherit pname version stdenv forstio adaptive-cpp-dev;
			kel-lbm = lbm;
		};
	};

	debug = {
		inherit adaptive-cpp-dev;
	};
}