Skip to content

Commit

Permalink
Merge pull request #1364 from cpcloud/unused-inputs
Browse files Browse the repository at this point in the history
chore: clean up unused inputs and tests; fix statix and deadnix lints
  • Loading branch information
adisbladis authored Oct 26, 2023
2 parents 81ea18d + 65f59a4 commit 3b6124e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 50 deletions.
2 changes: 1 addition & 1 deletion lib.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, pkgs, stdenv }:
{ lib, pkgs, ... }:
let
inherit (import ./semver.nix { inherit lib ireplace; }) satisfiesSemver;
inherit (builtins) genList length;
Expand Down
3 changes: 1 addition & 2 deletions mk-poetry-dep.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand Down
12 changes: 7 additions & 5 deletions templates/app/flake.nix
Original file line number Diff line number Diff line change
@@ -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 }:
Expand Down
2 changes: 1 addition & 1 deletion tests/awscli/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ poetry2nix, runCommand }:
{ poetry2nix }:
poetry2nix.mkPoetryApplication {
projectDir = ./.;
}
2 changes: 1 addition & 1 deletion tests/bcrypt/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, poetry2nix, runCommand }:
{ lib, poetry2nix }:
poetry2nix.mkPoetryApplication {
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
Expand Down
2 changes: 1 addition & 1 deletion tests/grpcio-wheel/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ poetry2nix, python3, pkgs, runCommand }:
{ poetry2nix, python3, pkgs }:
let
inherit (pkgs.stdenv) isLinux;
env = poetry2nix.mkPoetryEnv {
Expand Down
2 changes: 1 addition & 1 deletion tests/markdown-it-py-wheel/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ poetry2nix, python3, pkgs, runCommand }:
{ poetry2nix, python3, pkgs }:
let
inherit (pkgs.stdenv) isLinux;
env = poetry2nix.mkPoetryEnv {
Expand Down
6 changes: 0 additions & 6 deletions tests/uwsgi/default.nix

This file was deleted.

17 changes: 0 additions & 17 deletions tests/uwsgi/poetry.lock

This file was deleted.

15 changes: 0 additions & 15 deletions tests/uwsgi/pyproject.toml

This file was deleted.

Empty file removed tests/uwsgi/test_uwsgi.py
Empty file.

0 comments on commit 3b6124e

Please sign in to comment.