From 1e88c6cdd0c960600b1d46d60508d8058ae1c1aa Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Wed, 25 Jun 2025 23:54:48 +0800 Subject: [PATCH 1/2] gigalixir: modernize --- pkgs/by-name/gi/gigalixir/package.nix | 36 ++++++++++++++------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/gi/gigalixir/package.nix b/pkgs/by-name/gi/gigalixir/package.nix index cd3106eeeb02..5364e4e9ed28 100644 --- a/pkgs/by-name/gi/gigalixir/package.nix +++ b/pkgs/by-name/gi/gigalixir/package.nix @@ -1,15 +1,15 @@ { stdenv, lib, - python3, + python3Packages, fetchPypi, git, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "gigalixir"; version = "1.13.1"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -18,11 +18,15 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace setup.py \ - --replace "'pytest-runner'," "" \ - --replace "cryptography==" "cryptography>=" + --replace-fail "'pytest-runner'," "" \ + --replace-fail "cryptography==" "cryptography>=" ''; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ click pygments pyopenssl @@ -32,15 +36,13 @@ python3.pkgs.buildPythonApplication rec { stripe ]; - nativeCheckInputs = - [ - git - ] - ++ (with python3.pkgs; [ - httpretty - pytestCheckHook - sure - ]); + nativeCheckInputs = with python3Packages; [ + git + + httpretty + pytestCheckHook + sure + ]; disabledTests = [ # Test requires network access @@ -57,11 +59,11 @@ python3.pkgs.buildPythonApplication rec { "gigalixir" ]; - meta = with lib; { + meta = { broken = stdenv.hostPlatform.isDarwin; description = "Gigalixir Command-Line Interface"; homepage = "https://github.com/gigalixir/gigalixir-cli"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; mainProgram = "gigalixir"; }; From c61c419273845843cbac98d72b1f777c23e35b47 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 26 Jun 2025 00:09:05 +0800 Subject: [PATCH 2/2] gigalixir: 1.13.1 -> 1.14.0; switch to fetching from github --- pkgs/by-name/gi/gigalixir/package.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/gi/gigalixir/package.nix b/pkgs/by-name/gi/gigalixir/package.nix index 5364e4e9ed28..be34cf0be714 100644 --- a/pkgs/by-name/gi/gigalixir/package.nix +++ b/pkgs/by-name/gi/gigalixir/package.nix @@ -2,24 +2,25 @@ stdenv, lib, python3Packages, - fetchPypi, + fetchFromGitHub, git, }: python3Packages.buildPythonApplication rec { pname = "gigalixir"; - version = "1.13.1"; + version = "1.14.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-hYIuSLK2HeeXPL28qKvkKwPVpOwObNGrVWbDq6B0/IA="; + src = fetchFromGitHub { + owner = "gigalixir"; + repo = "gigalixir-cli"; + tag = "v${version}"; + hash = "sha256-D7HbNQ0heQ0aXAA+z0JIwqWlerChPvzXrIGtXz+UiwQ="; }; postPatch = '' substituteInPlace setup.py \ - --replace-fail "'pytest-runner'," "" \ - --replace-fail "cryptography==" "cryptography>=" + --replace-fail "'pytest-runner'," "" ''; build-system = with python3Packages; [ @@ -27,6 +28,7 @@ python3Packages.buildPythonApplication rec { ]; dependencies = with python3Packages; [ + importlib-metadata click pygments pyopenssl @@ -47,6 +49,8 @@ python3Packages.buildPythonApplication rec { disabledTests = [ # Test requires network access "test_rollback_without_version" + "test_rollback" + "test_create_user" # These following test's are now depraced and removed, check out these commits: # https://github.com/gigalixir/gigalixir-cli/commit/00b758ed462ad8eff6ff0b16cd37fa71f75b2d7d # https://github.com/gigalixir/gigalixir-cli/commit/76fa25f96e71fd75cc22e5439b4a8f9e9ec4e3e5 @@ -60,7 +64,6 @@ python3Packages.buildPythonApplication rec { ]; meta = { - broken = stdenv.hostPlatform.isDarwin; description = "Gigalixir Command-Line Interface"; homepage = "https://github.com/gigalixir/gigalixir-cli"; license = lib.licenses.mit;