-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
51 lines (42 loc) · 1.2 KB
/
flake.nix
File metadata and controls
51 lines (42 loc) · 1.2 KB
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
{
description = "clank";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
};
outputs = {
self,
nixpkgs,
}: let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in {
# `nix fmt`
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# `nix build` / `nix run` / `nix shell`
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
container = nixpkgs.lib.nixosSystem {
system = system;
modules = [./container];
};
clank = pkgs.python3Packages.buildPythonApplication {
pname = "clank";
version = "0.0.1";
pyproject = true;
src = ./.;
build-system = [pkgs.python3Packages.setuptools];
doCheck = false; # has no tests, of course
dependencies = [
pkgs.podman
];
makeWrapperArgs = builtins.concatLists [
["--set" "CLANK_EMPTY_DIRECTORY" "${pkgs.emptyDirectory}"]
["--set" "CLANK_ROOT" self.packages.${system}.container.config.system.build.toplevel]
];
};
default = self.packages.${system}.clank;
});
};
}