From 74354fd5ca611bf80b967cf308907fe6185f081d Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 14 Aug 2025 16:31:01 +0200 Subject: [PATCH] flake.nix: init --- .envrc | 1 + flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..883fb55 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1755082269, + "narHash": "sha256-Ix7ALeaxv9tW4uBKWeJnaKpYZtZiX4H4Q/MhEmj4XYA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d74de548348c46cf25cb1fcc4b74f38103a4590d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3849f0f --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: let + inherit (nixpkgs) lib; + + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + "armv7l-linux" + ]; + + forAllSystems = f: lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system}); + in { + devShells = forAllSystems (system: pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + (python3.withPackages (ppkgs: with ppkgs; [ + tqdm + psycopg2-binary + ])) + ]; + }; + }); + }; +}