refactor: replace python.callPkg with callPkg for apps

This commit is contained in:
matt1432 2025-06-01 15:46:02 -04:00
commit b9f61804aa
3 changed files with 9 additions and 14 deletions
packages

View file

@ -1,25 +1,23 @@
{
# nix build inputs
lib,
buildPythonApplication,
# deps
hatchling,
material-color-utilities,
python3Packages,
...
}: let
inherit (builtins) fromTOML readFile;
inherit (fromTOML (readFile ./pyproject.toml)) project;
in
buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = project.name;
inherit (project) version;
format = "pyproject";
src = ./.;
build-system = [hatchling];
dependencies = [material-color-utilities];
build-system = with python3Packages; [hatchling];
dependencies = with python3Packages; [material-color-utilities];
meta = {
mainProgram = pname;

View file

@ -4,7 +4,7 @@
...
}: (final: prev: {
selfPackages = {
coloryou = final.python3Packages.callPackage ./coloryou {};
coloryou = final.callPackage ./coloryou {};
gpu-screen-recorder = final.callPackage ./gpu-screen-recorder {
inherit (inputs) gpu-screen-recorder-src;
@ -48,7 +48,7 @@
some-sass-language-server = final.callPackage ./some-sass-language-server {};
subscleaner = final.python3Packages.callPackage ./subscleaner {
subscleaner = final.callPackage ./subscleaner {
inherit (inputs) subscleaner-src;
};

View file

@ -1,13 +1,10 @@
{
# nix build inputs
lib,
buildPythonApplication,
subscleaner-src,
# deps
appdirs,
chardet,
hatch,
pysrt,
python3Packages,
...
}: let
inherit (builtins) fromTOML readFile;
@ -17,7 +14,7 @@
pname = pyproject.project.name;
version = "${pyproject.project.version}+${subscleaner-src.shortRev}";
in
buildPythonApplication {
python3Packages.buildPythonApplication {
inherit pname version;
format = "pyproject";
@ -25,7 +22,7 @@ in
build-system = [hatch];
dependencies = [
dependencies = with python3Packages; [
pysrt
chardet
appdirs