Skip to content

Instantly share code, notes, and snippets.

@LinArcX
Created April 16, 2019 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LinArcX/49a50008539de8a92c1cc8e25dba5833 to your computer and use it in GitHub Desktop.
Save LinArcX/49a50008539de8a92c1cc8e25dba5833 to your computer and use it in GitHub Desktop.
{ stdenv, fetchurl, dpkg }:
stdenv.mkDerivation rec {
pname = "etcher-bin";
version = "1.5.26";
src = fetchurl {
url = "https://github.com/balena-io/etcher/releases/download/v${version}/balena-etcher-electron_${version}_amd64.deb";
sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7";
};
buildInputs = [ dpkg ];
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
dontBuild = true;
installPhase = ''
mkdir -p "$out/bin"
cp -a usr/* "$out/"
'';
meta = with stdenv.lib; {
description = "Flash OS images to SD cards & USB drives, safely and easily";
homepage = https://etcher.io;
license = licenses.asl20;
platforms = platforms.linux;
maintainers = [ maintainers.linarcx ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment