diff --git a/lib.nix b/lib.nix index 2aea27ab9..ed8616e20 100644 --- a/lib.nix +++ b/lib.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, stdenv }: +{ lib, pkgs, ... }: let inherit (import ./semver.nix { inherit lib ireplace; }) satisfiesSemver; inherit (builtins) genList length; diff --git a/mk-poetry-dep.nix b/mk-poetry-dep.nix index 47aa37e15..02500c378 100644 --- a/mk-poetry-dep.nix +++ b/mk-poetry-dep.nix @@ -44,7 +44,6 @@ pythonPackages.callPackage isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname; in builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files; - toPath = s: pwd + "/${s}"; isLocked = lib.length fileCandidates > 0; isSource = source != null; isGit = isSource && source.type == "git"; @@ -53,7 +52,7 @@ pythonPackages.callPackage isDirectory = isSource && source.type == "directory"; isFile = isSource && source.type == "file"; isLegacy = isSource && source.type == "legacy"; - localDepPath = toPath source.url; + localDepPath = pwd + "/${source.url}"; buildSystemPkgs = let diff --git a/templates/app/flake.nix b/templates/app/flake.nix index b99f0dee5..9f7604aa5 100644 --- a/templates/app/flake.nix +++ b/templates/app/flake.nix @@ -1,11 +1,13 @@ { description = "Application packaged using poetry2nix"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - inputs.poetry2nix = { - url = "github:nix-community/poetry2nix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + poetry2nix = { + url = "github:nix-community/poetry2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, flake-utils, poetry2nix }: diff --git a/tests/awscli/default.nix b/tests/awscli/default.nix index 073a384b8..5ceae1e8a 100644 --- a/tests/awscli/default.nix +++ b/tests/awscli/default.nix @@ -1,4 +1,4 @@ -{ poetry2nix, runCommand }: +{ poetry2nix }: poetry2nix.mkPoetryApplication { projectDir = ./.; } diff --git a/tests/bcrypt/default.nix b/tests/bcrypt/default.nix index b6765f2d9..79c92e233 100644 --- a/tests/bcrypt/default.nix +++ b/tests/bcrypt/default.nix @@ -1,4 +1,4 @@ -{ lib, poetry2nix, runCommand }: +{ lib, poetry2nix }: poetry2nix.mkPoetryApplication { pyproject = ./pyproject.toml; poetrylock = ./poetry.lock; diff --git a/tests/grpcio-wheel/default.nix b/tests/grpcio-wheel/default.nix index b5db25770..609d23419 100644 --- a/tests/grpcio-wheel/default.nix +++ b/tests/grpcio-wheel/default.nix @@ -1,4 +1,4 @@ -{ poetry2nix, python3, pkgs, runCommand }: +{ poetry2nix, python3, pkgs }: let inherit (pkgs.stdenv) isLinux; env = poetry2nix.mkPoetryEnv { diff --git a/tests/markdown-it-py-wheel/default.nix b/tests/markdown-it-py-wheel/default.nix index 2786772ca..42d8443e2 100644 --- a/tests/markdown-it-py-wheel/default.nix +++ b/tests/markdown-it-py-wheel/default.nix @@ -1,4 +1,4 @@ -{ poetry2nix, python3, pkgs, runCommand }: +{ poetry2nix, python3, pkgs }: let inherit (pkgs.stdenv) isLinux; env = poetry2nix.mkPoetryEnv { diff --git a/tests/uwsgi/default.nix b/tests/uwsgi/default.nix deleted file mode 100644 index b6765f2d9..000000000 --- a/tests/uwsgi/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, poetry2nix, runCommand }: -poetry2nix.mkPoetryApplication { - pyproject = ./pyproject.toml; - poetrylock = ./poetry.lock; - src = lib.cleanSource ./.; -} diff --git a/tests/uwsgi/poetry.lock b/tests/uwsgi/poetry.lock deleted file mode 100644 index 2d37c3b9d..000000000 --- a/tests/uwsgi/poetry.lock +++ /dev/null @@ -1,17 +0,0 @@ -[[package]] -name = "uwsgi" -version = "2.0.19.1" -description = "The uWSGI server" -category = "main" -optional = false -python-versions = "*" - -[metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "ec1973a5762a2a84e937c4d4712774561a9ddbbe91905a20053e4890176f1a33" - -[metadata.files] -uwsgi = [ - {file = "uWSGI-2.0.19.1.tar.gz", hash = "sha256:faa85e053c0b1be4d5585b0858d3a511d2cd10201802e8676060fd0a109e5869"}, -] diff --git a/tests/uwsgi/pyproject.toml b/tests/uwsgi/pyproject.toml deleted file mode 100644 index bbfee5cf5..000000000 --- a/tests/uwsgi/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "test_uwsgi" -version = "0.1.0" -description = "" -authors = [] - -[tool.poetry.dependencies] -python = "^3.8" -uwsgi = "^2.0.19" - -[tool.poetry.dev-dependencies] - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/tests/uwsgi/test_uwsgi.py b/tests/uwsgi/test_uwsgi.py deleted file mode 100644 index e69de29bb..000000000