about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/tools/misc/etcher/default.nix72
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix4
3 files changed, 1 insertions, 76 deletions
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 77374d6eae9b4..cb8563c85e578 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7942,10 +7942,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 { };