From ab11bab12dcd935ece98dbac7de4aff3f3dd5555 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:14:42 +0100 Subject: [PATCH] etcher: remove --- pkgs/tools/misc/etcher/default.nix | 72 ------------------------------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 -- 3 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 pkgs/tools/misc/etcher/default.nix diff --git a/pkgs/tools/misc/etcher/default.nix b/pkgs/tools/misc/etcher/default.nix deleted file mode 100644 index 4b27f35cf53c9..0000000000000 --- a/pkgs/tools/misc/etcher/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ lib -, stdenv -, fetchurl -, bash -, util-linux -, autoPatchelfHook -, dpkg -, makeWrapper -, udev -, electron -}: - -stdenv.mkDerivation rec { - pname = "etcher"; - version = "1.18.12"; - - src = fetchurl { - url = "https://github.com/balena-io/etcher/releases/download/v${version}/balena-etcher_${version}_amd64.deb"; - hash = "sha256-Ucs187xTpbRJ7P32hCl8cHPxO3HCs44ZneAas043FXk="; - }; - - # sudo-prompt has hardcoded binary paths on Linux and we patch them here - # along with some other paths - postPatch = '' - substituteInPlace opt/balenaEtcher/resources/app/generated/gui.js \ - --replace '/usr/bin/pkexec' '/usr/bin/pkexec", "/run/wrappers/bin/pkexec' \ - --replace '/bin/bash' '${bash}/bin/bash' \ - --replace '"lsblk"' '"${util-linux}/bin/lsblk"' - ''; - - nativeBuildInputs = [ - autoPatchelfHook - dpkg - makeWrapper - ]; - - buildInputs = [ - stdenv.cc.cc.lib - udev - ]; - - dontConfigure = true; - - dontBuild = true; - - installPhase = '' - runHook preInstall - - mkdir -p $out/bin $out/share/${pname} - - cp -a usr/share/* $out/share - cp -a opt/balenaEtcher/{locales,resources} $out/share/${pname} - - makeWrapper ${electron}/bin/electron $out/bin/${pname} \ - --add-flags $out/share/${pname}/resources/app - - substituteInPlace $out/share/applications/balena-etcher.desktop \ - --replace /opt/balenaEtcher/balena-etcher ${pname} - - runHook postInstall - ''; - - meta = with lib; { - description = "Flash OS images to SD cards and USB drives, safely and easily"; - homepage = "https://etcher.io/"; - license = licenses.asl20; - mainProgram = "etcher"; - maintainers = with maintainers; [ wegank ]; - platforms = [ "x86_64-linux" ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index f06a9f16d661c..9f4dbece77516 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -286,6 +286,7 @@ mapAliases ({ erlang_23 = throw "erlangR23 has been removed in favor of newer versions."; # added 2023-09-11 erlangR23 = erlang_23; etcd_3_3 = throw "etcd_3_3 has been removed because upstream no longer maintains it"; # Added 2023-09-29 + etcher = throw "'etcher' has been removed because it depended on an insecure version of Electron"; # Added 2024-03-14 eterm = throw "eterm was removed because it is still insecure: https://github.com/mej/Eterm/issues/7"; # Added 2023-09-10 exa = throw "'exa' has been removed because it is unmaintained upstream. Consider using 'eza', a maintained fork"; # Added 2023-09-07 exhibitor = throw "'exhibitor' has been removed because it is unmaintained upstream"; # Added 2023-06-20 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab3de3d72503e..0208870304a6b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7949,10 +7949,6 @@ with pkgs; esshader = callPackage ../tools/graphics/esshader { }; - etcher = callPackage ../tools/misc/etcher { - electron = electron_19; - }; - ethercalc = callPackage ../servers/web-apps/ethercalc { }; ethtool = callPackage ../tools/misc/ethtool { };