-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
39 lines (39 loc) · 980 Bytes
/
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
};
outputs = {
systems,
nixpkgs,
...
}: let
# Small tool to iterate over each systems
eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (system:
f (import nixpkgs {
inherit system;
}));
in {
devShells = eachSystem (pkgs: {
default = let
my-python = pkgs.python3;
python-with-my-packages = my-python.withPackages (p:
with p; [
dbus-python
# other python packages you want
]);
in
pkgs.mkShell {
packages = with pkgs; [
libsForQt5.kdialog
python-with-my-packages
# other dependencies
];
shellHook = ''
PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
'';
};
});
};
}