Files
nixpkgs/pkgs/by-name/pi/pixelflasher/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

101 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
wrapGAppsHook3,
python3Packages,
makeDesktopItem,
copyDesktopItems,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "pixelflasher";
version = "8.6.0.0";
format = "other";
src = fetchFromGitHub {
owner = "badabing2005";
repo = "PixelFlasher";
tag = "v${version}";
hash = "sha256-lCh4LmmFdX/CvJSYWso1c8cBklb+/qXsbUY3nrzKCYk=";
};
desktopItems = [
(makeDesktopItem {
name = "PixelFlasher";
exec = "pixelflasher";
icon = "pixelflasher";
desktopName = "PixelFlasher";
genericName = "Pixel phone flashing GUI utility with features";
categories = [ "Development" ];
})
];
dependencies = with python3Packages; [
attrdict
beautifulsoup4
bsdiff4
chardet
cryptography
darkdetect
httplib2
json5
lz4
markdown
platformdirs
polib
protobuf
psutil
pyperclip
requests
rsa
six
wxpython
];
nativeBuildInputs = [
wrapGAppsHook3
python3Packages.pyinstaller
copyDesktopItems
];
buildPhase =
let
specFile =
if stdenv.hostPlatform.isDarwin then
if stdenv.hostPlatform.isAarch64 then "build-on-mac" else "build-on-mac-intel-only"
else
"build-on-linux";
in
''
runHook preBuild
pyinstaller --clean --noconfirm --log-level=DEBUG ${specFile}.spec
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/icons/hicolor/64x64/apps
cp dist/PixelFlasher $out/bin/pixelflasher
cp images/icon-64.png $out/share/icons/hicolor/64x64/apps/pixelflasher.png
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Pixel phone flashing GUI utility with features";
homepage = "https://github.com/badabing2005/PixelFlasher";
changelog = "https://github.com/badabing2005/PixelFlasher/releases/tag/v${version}";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ cything ];
mainProgram = "pixelflasher";
platforms = lib.platforms.linux;
};
}