From 322bf46a6c9822cf7a0b93da1ed4657a5b20518f Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 22 Feb 2024 22:48:17 +0100 Subject: [PATCH] Set up project --- eufs/main.py | 2 + flake.lock | 175 +++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 37 +++++++++++ poetry.lock | 17 +++++ pyproject.toml | 17 +++++ 5 files changed, 248 insertions(+) create mode 100644 eufs/main.py create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/eufs/main.py b/eufs/main.py new file mode 100644 index 0000000..46b4ca5 --- /dev/null +++ b/eufs/main.py @@ -0,0 +1,2 @@ +def main(): + print("Hello world!") diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ebc563b --- /dev/null +++ b/flake.lock @@ -0,0 +1,175 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703863825, + "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1708475490, + "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1708589824, + "narHash": "sha256-2GOiFTkvs5MtVF65sC78KNVxQSmsxtk0WmV1wJ9V2ck=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "3c92540611f42d3fb2d0d084a6c694cd6544b609", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "id": "systems", + "type": "indirect" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708335038, + "narHash": "sha256-ETLZNFBVCabo7lJrpjD6cAbnE11eDOjaQnznmg/6hAE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e504621290a1fd896631ddbc5e9c16f4366c9f65", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b74542b --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + description = "FUSE-based euphoria.leet.nu client"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + flake-utils.url = "github:numtide/flake-utils"; + + poetry2nix.url = "github:nix-community/poetry2nix"; + poetry2nix.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, flake-utils, poetry2nix }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + p2n = poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }; + in + { + packages.default = p2n.mkPoetryApplication { + projectDir = ./.; + overrides = p2n.defaultPoetryOverrides.extend (self: super: { + # https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md#modulenotfounderror-no-module-named-packagename + # https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/fuse-python/default.nix + fuse-python = super.fuse-python.overridePythonAttrs (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; + buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools pkgs.fuse ]; + }); + }); + }; + + devShells.default = pkgs.mkShell { + inputsFrom = [ self.packages.${system}.default ]; + packages = [ pkgs.poetry ]; + }; + }); +} diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..08abaa0 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,17 @@ +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "fuse-python" +version = "1.0.7" +description = "Bindings for FUSE" +optional = false +python-versions = "*" +files = [ + {file = "fuse-python-1.0.7.tar.gz", hash = "sha256:32188063652408cd472aebb6f92d35df92c8bb42009371f8c8927bb37e6bdd1b"}, + {file = "fuse_python-1.0.7-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:873d177ebf1c28c2a7609e4727fbed5713d5c2d8113fb072bd6b7ae87a722fc0"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.11" +content-hash = "78b4e5022cbdec633443a6497c52138f3c59438af5df1922653e6e021a869b9d" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e909f22 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +name = "eufs" +version = "0.0.0" +description = "FUSE-based euphoria.leet.nu client" +authors = [] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.11" +fuse-python = "^1.0.7" + +[tool.poetry.scripts] +eufs = "eufs.main:main"