Enhance Nix package definitions by adding new packages for inputs and steam-python, updating build inputs for colordle and dosage, and improving installation scripts. Notable changes include the addition of desktop and metainfo files for colordle, and ensuring proper GResource handling in dosage.
This commit is contained in:
parent
a8e7517e9a
commit
d1f011ba1f
@ -26,26 +26,28 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python3
|
|
||||||
gtk4
|
gtk4
|
||||||
libadwaita
|
libadwaita
|
||||||
|
(python3.withPackages (ps: with ps; [
|
||||||
|
pygobject3
|
||||||
|
pycairo
|
||||||
|
]))
|
||||||
];
|
];
|
||||||
|
|
||||||
# This is likely a Python GTK application
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/bin $out/share/hexcolordle-gtk
|
mkdir -p $out/bin $out/share/hexcolordle-gtk $out/share/applications $out/share/metainfo
|
||||||
cp -r * $out/share/hexcolordle-gtk/
|
cp -r * $out/share/hexcolordle-gtk/
|
||||||
|
|
||||||
# Create a wrapper script if there's a main Python file
|
# Install desktop file and metainfo
|
||||||
if [ -f main.py ]; then
|
cp net.krafting.HexColordle.desktop $out/share/applications/
|
||||||
makeWrapper ${python3}/bin/python3 $out/bin/hexcolordle-gtk \
|
cp net.krafting.HexColordle.metainfo.xml $out/share/metainfo/
|
||||||
--add-flags "$out/share/hexcolordle-gtk/main.py"
|
|
||||||
elif [ -f hexcolordle.py ]; then
|
# Create wrapper for the main Python file
|
||||||
makeWrapper ${python3}/bin/python3 $out/bin/hexcolordle-gtk \
|
makeWrapper ${python3.withPackages (ps: with ps; [pygobject3 pycairo])}/bin/python3 $out/bin/hexcolordle-gtk \
|
||||||
--add-flags "$out/share/hexcolordle-gtk/hexcolordle.py"
|
--add-flags "$out/share/hexcolordle-gtk/HexColordle.py" \
|
||||||
fi
|
--prefix PYTHONPATH : "$out/share/hexcolordle-gtk"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
gtk4,
|
gtk4,
|
||||||
libadwaita,
|
libadwaita,
|
||||||
wrapGAppsHook4,
|
wrapGAppsHook4,
|
||||||
|
makeWrapper,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -38,18 +39,30 @@ stdenv.mkDerivation rec {
|
|||||||
glib
|
glib
|
||||||
appstream-glib
|
appstream-glib
|
||||||
appstream
|
appstream
|
||||||
|
wrapGAppsHook4
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
gjs
|
gjs
|
||||||
gtk4
|
gtk4
|
||||||
libadwaita
|
libadwaita
|
||||||
wrapGAppsHook4
|
glib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Ensure GResource files are properly accessible
|
||||||
|
postInstall = ''
|
||||||
|
# The GResource files should be automatically handled by wrapGAppsHook4
|
||||||
|
# but let's make sure the GResource path is correct
|
||||||
|
wrapProgram $out/bin/io.github.diegopvlk.Dosage \
|
||||||
|
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Medication tracker for Linux";
|
description = "Medication tracker for Linux";
|
||||||
homepage = "https://github.com/diegopvlk/Dosage";
|
homepage = "https://github.com/diegopvlk/Dosage";
|
||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
maintainers = with lib.maintainers; [ ];
|
maintainers = with lib.maintainers; [ ];
|
||||||
mainProgram = "dosage";
|
mainProgram = "io.github.diegopvlk.Dosage";
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
38
pkgs_wip/inputs.nix
Normal file
38
pkgs_wip/inputs.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
buildPythonPackage,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "inputs";
|
||||||
|
version = "0.5";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "zeth";
|
||||||
|
repo = "inputs";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-tU1R6lhSMZj3Y6XdrT/Yfbte/BdLDvo6TzvLbnr+1vo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"inputs"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Cross-platform Python support for keyboards, mice and gamepads";
|
||||||
|
homepage = "https://github.com/zeth/inputs";
|
||||||
|
changelog = "https://github.com/zeth/inputs/blob/${src.rev}/CHANGELOG.rst";
|
||||||
|
license = lib.licenses.bsd3;
|
||||||
|
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||||
|
mainProgram = "inputs";
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@
|
|||||||
lib,
|
lib,
|
||||||
buildPythonApplication,
|
buildPythonApplication,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
callPackage,
|
||||||
setuptools,
|
setuptools,
|
||||||
pyside6,
|
pyside6,
|
||||||
pyxdg,
|
pyxdg,
|
||||||
@ -41,8 +42,8 @@ buildPythonApplication rec {
|
|||||||
requests
|
requests
|
||||||
vdf
|
vdf
|
||||||
zstandard
|
zstandard
|
||||||
# Note: inputs and steam dependencies removed as they're not in nixpkgs
|
(callPackage ./inputs.nix { })
|
||||||
# May need to add them back if they become available in nixpkgs
|
(callPackage ./steam-python.nix { })
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -50,6 +51,6 @@ buildPythonApplication rec {
|
|||||||
homepage = "https://github.com/DavidoTek/ProtonUp-Qt";
|
homepage = "https://github.com/DavidoTek/ProtonUp-Qt";
|
||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||||
mainProgram = "proton-up-qt";
|
mainProgram = "protonup-qt";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
59
pkgs_wip/steam-python.nix
Normal file
59
pkgs_wip/steam-python.nix
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
callPackage,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
six,
|
||||||
|
pycryptodomex,
|
||||||
|
requests,
|
||||||
|
urllib3,
|
||||||
|
vdf,
|
||||||
|
gevent,
|
||||||
|
protobuf,
|
||||||
|
cachetools,
|
||||||
|
cryptography,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "steam-python";
|
||||||
|
version = "1.4.4";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ValvePython";
|
||||||
|
repo = "steam";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
six
|
||||||
|
pycryptodomex
|
||||||
|
requests
|
||||||
|
urllib3
|
||||||
|
vdf
|
||||||
|
gevent
|
||||||
|
protobuf
|
||||||
|
cachetools
|
||||||
|
cryptography
|
||||||
|
(callPackage ../pkgs_pr/gevent-eventemitter.nix { })
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"steam"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Python package for interacting with Steam";
|
||||||
|
homepage = "https://github.com/ValvePython/steam";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
60
pkgs_wip/steam.nix
Normal file
60
pkgs_wip/steam.nix
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
callPackage,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
six,
|
||||||
|
pycryptodomex,
|
||||||
|
requests,
|
||||||
|
urllib3,
|
||||||
|
vdf,
|
||||||
|
gevent,
|
||||||
|
protobuf,
|
||||||
|
cachetools,
|
||||||
|
cryptography,
|
||||||
|
gevent-eventemitter,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "steam-python";
|
||||||
|
version = "1.4.4";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ValvePython";
|
||||||
|
repo = "steam";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
six
|
||||||
|
pycryptodomex
|
||||||
|
requests
|
||||||
|
urllib3
|
||||||
|
vdf
|
||||||
|
gevent
|
||||||
|
protobuf
|
||||||
|
cachetools
|
||||||
|
cryptography
|
||||||
|
gevent-eventemitter
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"steam"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Python package for interacting with Steam";
|
||||||
|
homepage = "https://github.com/ValvePython/steam";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user