about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-04-14 16:32:55 +0200
committerEmile <git@emile.space>2024-04-14 16:32:55 +0200
commit26f702fa2afe7e9ba433fbf264bde7f49a5f3d92 (patch)
treede9a0918a3ab9026bb3093b5920f12bd2611c0b3
parente7172ceae200836fbba37c82b81f732f2e58ca09 (diff)
basic python template
-rw-r--r--nix/templates/python3/flake.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nix/templates/python3/flake.nix b/nix/templates/python3/flake.nix
new file mode 100644
index 0000000..f5c2378
--- /dev/null
+++ b/nix/templates/python3/flake.nix
@@ -0,0 +1,31 @@
+{
+	description = "a simple flake for using python with some dependencies";
+	nixConfig.bash-promt = "py; ";
+
+	inputs = {
+    nixpkgs.url = "git+https://github.com/nixos/nixpkgs?ref=release-23.11";
+	};
+	
+	outputs = { nixpkgs, ... }:
+	
+	let
+		pkgs = import nixpkgs {
+			system = "aarch64-darwin";
+		};
+	in {
+		devShells."aarch64-darwin".default =
+			let
+				python = pkgs.python311;
+			in
+				pkgs.mkShell {
+			  packages = [
+			    (python.withPackages (ps: with ps; [
+						pwntools
+						beautifulsoup4
+						requests
+			    ]))
+			  ];
+			};
+	};
+}
+