diff --git a/.gitignore b/.gitignore index 8feebe3..7021f97 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .obsidian/workspace.json .venv/ .obsidian/graph.json +.direnv/ diff --git a/practice/flake.lock b/practice/flake.lock new file mode 100644 index 0000000..e6e2b2c --- /dev/null +++ b/practice/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1782847189, + "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/practice/flake.nix b/practice/flake.nix new file mode 100644 index 0000000..adf62d6 --- /dev/null +++ b/practice/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Minimal UV-to-NixOS devShell for testing solutions using nix-ld."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + uv + ruff + ]; + + # Expose libraries to the nix-ld environment + # NOTE: This devShell requires `programs.nix-ld.enable = true;` to be set in your + # NixOS configuration (/etc/nixos/configuration.nix) to successfully run downloaded + # pre-compiled binaries (e.g. PyPI dynamic wheels). + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + pkgs.stdenv.cc.cc.lib + pkgs.zlib + pkgs.glib + ]; + }; + }); +} diff --git a/practice/uv.lock b/practice/uv.lock new file mode 100644 index 0000000..b4ba192 --- /dev/null +++ b/practice/uv.lock @@ -0,0 +1,8 @@ +version = 1 +revision = 3 +requires-python = ">=3.13" + +[[package]] +name = "practice" +version = "0.1.0" +source = { virtual = "." }