-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
32 lines (32 loc) · 958 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, ... }@inputs: # @inputs let's us access the inputs anywhere in the file
let
system = "x86_64-linux";
myPkgs = nixpkgs.legacyPackages.${system};
pkgList = with myPkgs;[
python312
nginx # reverse proxy, load balancer, and web server
] ++
(with myPkgs.python312Packages; [
ipython
gunicorn
django
pandas
numpy
]);
in
{
devShells.x86_64-linux.default = myPkgs.mkShell {
buildInputs = pkgList;
shellHook = ''
echo "You are in a ${system} shell with ${
myPkgs.lib.concatStrings # concatenate all strings in the list so they can be coerced to a single string
(builtins.map(x: "\n flake: " + x) pkgList) # prepend new line to each package name
}."
'';
};
};
}