From 7f1e16d56d08b62c14198420f98776df174691a0 Mon Sep 17 00:00:00 2001 From: Summer Tea Date: Mon, 30 Dec 2024 06:02:56 -0500 Subject: [PATCH 1/2] maintainers: add acuteaangle --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fe22dbee1134..1b4e9f8e63a1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -529,6 +529,13 @@ githubId = 124545; name = "Anthony Cowley"; }; + acuteaangle = { + name = "Summer Tea"; + email = "zestypurple@protonmail.com"; + github = "acuteaangle"; + githubId = 79724236; + keys = [ { fingerprint = "46C0 9BA8 A20E 5C50 1E1E 0597 0B6D 17F7 2BC4 7F61"; } ]; + }; acuteenvy = { matrix = "@acuteenvy:matrix.org"; github = "acuteenvy"; From 06489c0fa2b6441d3f8f84de93ef16372ad0bd62 Mon Sep 17 00:00:00 2001 From: Summer Tea Date: Mon, 30 Dec 2024 11:52:31 -0500 Subject: [PATCH 2/2] pineflash: init at 0.5.5 Co-authored-by: Janik H. <80165193+Janik-Haag@users.noreply.github.com> --- pkgs/by-name/pi/pineflash/package.nix | 88 +++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 pkgs/by-name/pi/pineflash/package.nix diff --git a/pkgs/by-name/pi/pineflash/package.nix b/pkgs/by-name/pi/pineflash/package.nix new file mode 100644 index 000000000000..d19f28b583c9 --- /dev/null +++ b/pkgs/by-name/pi/pineflash/package.nix @@ -0,0 +1,88 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + pkg-config, + autoPatchelfHook, + blisp, + dfu-util, + fontconfig, + glib, + gtk3, + openssl, + systemd, + libGL, + libxkbcommon, + nix-update-script, +}: +rustPlatform.buildRustPackage rec { + pname = "pineflash"; + version = "0.5.5"; + + src = fetchFromGitHub { + owner = "Spagett1"; + repo = "pineflash"; + tag = version; + hash = "sha256-4tcwEok36vuXbtlZNUkLNw1kHFQPBEJM/gWRhRWNLPg="; + }; + + cargoHash = "sha256-l01It6mUflENlADW6PpOQvK1o4qOjbTsMLB6n+OIl0U="; + + nativeBuildInputs = [ + pkg-config + ] ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; + + buildInputs = [ + blisp + dfu-util + fontconfig + glib + gtk3 + openssl + systemd + ]; + + runtimeDependencies = [ + libGL + libxkbcommon + ]; + + postPatch = + '' + substituteInPlace src/submodules/flash.rs \ + --replace-fail 'let command = Command::new("pkexec")' 'let command = Command::new("/run/wrappers/bin/pkexec")' + '' + + lib.optionalString stdenv.hostPlatform.isLinux '' + substituteInPlace src/submodules/flash.rs \ + --replace-fail 'let blisppath = "blisp";' 'let blisppath = "${lib.getExe blisp}";' \ + --replace-fail 'let dfupath = "dfu-util";' 'let dfupath = "${lib.getExe' dfu-util "dfu-util"}";' + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace src/submodules/flash.rs \ + --replace-fail 'Command::new("blisp")' 'Command::new("${lib.getExe blisp}")' \ + --replace-fail 'Command::new("dfu-util")' 'Command::new("${lib.getExe' dfu-util "dfu-util"}")' + ''; + + postInstall = '' + mkdir -p "$out/share/applications" + cp ./assets/Pineflash.desktop "$out/share/applications/Pineflash.desktop" + mkdir -p "$out/share/pixmaps" + cp ./assets/pine64logo.png "$out/share/pixmaps/pine64logo.png" + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "GUI tool to flash IronOS to the Pinecil V1 and V2"; + homepage = "https://github.com/Spagett1/pineflash"; + changelog = "https://github.com/Spagett1/pineflash/releases/tag/${version}"; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ + acuteaangle + ]; + mainProgram = "pineflash"; + }; +}