Skip to content

Commit

Permalink
organize: package version using uv
Browse files Browse the repository at this point in the history
  • Loading branch information
adfaure committed Dec 5, 2024
1 parent cb680f4 commit 23794c9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 36 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 23 additions & 33 deletions pkgs/organize/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,31 @@
python3Packages.buildPythonApplication rec {
pname = "organize";
version = "3.2.5";
format = "pyproject";

# disabled = python3.pythonOlder "3.9";

# TODO:How could I handle that better ?
# - Ask upstream to loosen the version
# - Create a package with the deps ?
patchPhase = ''
substituteInPlace pyproject.toml --replace \
'pdfminer-six = "^20231228"' 'pdfminer-six = "^20240706"'
'';
pyproject = true;

src = fetchFromGitHub {
owner = "tfeldmann";
owner = "adfaure";
repo = "${pname}";
rev = "v${version}";
hash = "sha256-C68S1AFfiOAMuvEU2sBHIgdQkPX6ydied4Kq4ChmLP8=";
rev = "uv";
hash = "sha256-5LoQLCSi8YzlOOGxzNZBAatFR7Fshu2U4IJOrdurXSE=";
};

# All requirements are pinned
pythonRelaxDeps = false;
build-system = [ python3.pkgs.setuptools ];

nativeCheckInputs = [
python3Packages.pytestCheckHook
];

nativeBuildInputs = with python3.pkgs; [
poetry-core
buildInputs = with python3.pkgs; [
# Dev dependencies for test
coverage
mypy
pyfakefs
pytest-cov
pytest
requests
ruff
types-pyyaml
];

propagatedBuildInputs = (with python3.pkgs; [
Expand All @@ -54,30 +55,19 @@ python3Packages.buildPythonApplication rec {
pyyaml
rich
send2trash

]) ++ [
simplematch
ExifRead
];

pythonImportsCheck = [
"poetry.core"
];

# Allow for package to use pep420's native namespaces
pythonNamespaces = [
"poetry"
];

# https://codeload.github.com/tfeldmann/organize/tar.gz/refs/tags/v3.2.1

# Tests do not pass
doCheck = false;
meta = with lib; {
doCheck = true;

meta = {
description = "";
homepage = https://github.com/tfeldmann;
platforms = python3Packages.pyinotify.meta.platforms;
licence = licenses.gpl2;
licence = lib.licenses.gpl2;
longDescription = ''
'';
};
Expand Down

0 comments on commit 23794c9

Please sign in to comment.