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:
@@ -26,26 +26,28 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
python3
|
||||
gtk4
|
||||
libadwaita
|
||||
(python3.withPackages (ps: with ps; [
|
||||
pygobject3
|
||||
pycairo
|
||||
]))
|
||||
];
|
||||
|
||||
# This is likely a Python GTK application
|
||||
installPhase = ''
|
||||
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/
|
||||
|
||||
# Create a wrapper script if there's a main Python file
|
||||
if [ -f main.py ]; then
|
||||
makeWrapper ${python3}/bin/python3 $out/bin/hexcolordle-gtk \
|
||||
--add-flags "$out/share/hexcolordle-gtk/main.py"
|
||||
elif [ -f hexcolordle.py ]; then
|
||||
makeWrapper ${python3}/bin/python3 $out/bin/hexcolordle-gtk \
|
||||
--add-flags "$out/share/hexcolordle-gtk/hexcolordle.py"
|
||||
fi
|
||||
# Install desktop file and metainfo
|
||||
cp net.krafting.HexColordle.desktop $out/share/applications/
|
||||
cp net.krafting.HexColordle.metainfo.xml $out/share/metainfo/
|
||||
|
||||
# Create wrapper for the main Python file
|
||||
makeWrapper ${python3.withPackages (ps: with ps; [pygobject3 pycairo])}/bin/python3 $out/bin/hexcolordle-gtk \
|
||||
--add-flags "$out/share/hexcolordle-gtk/HexColordle.py" \
|
||||
--prefix PYTHONPATH : "$out/share/hexcolordle-gtk"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user