Created
April 16, 2019 12:41
-
-
Save LinArcX/b324be306bd4fc7e5a5595886313ce64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, dpkg, makeWrapper }: | |
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 = "01zsgi420vbllfzwz86j8daqgbywf5vvaf3rlk0cka8plgy505ji"; | |
}; | |
nativeBuildInputs = [ dpkg makeWrapper ]; | |
phases = [ "installPhase" ]; | |
# unpackPhase = '' | |
# dpkg-deb -x $src $out | |
# ''; | |
# | |
# dontBuild = true; | |
installPhase = '' | |
dpkg-deb -x $src $out | |
echo "Hello" | |
program=$out/opt/balenaEtcher/balena-etcher-electron | |
echo $program | |
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $program | |
''; | |
# mkdir -p "$out/bin" | |
# cp -a usr/* "$out/" | |
#dpkg-deb -x ${src} ./ | |
#interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2 | |
#wrapProgram $pgm --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl stdenv.cc.cc ]} | |
#patchelf --set-interpreter "$interpreter" $program | |
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