final: prev: let rev = "407ceb7cc5b72598aed79fb59c5c8c545b951f8e"; in { wifi2qr = prev.stdenv.mkDerivation { name = "wifi2qr"; version = builtins.substring 0 8 rev; src = prev.fetchurl { url = "https://raw.githubusercontent.com/dlenski/wifi2qr/${rev}/wifi2qr"; hash = "sha256-FmiSlYhq3SoUNaWMByvHGO91dFsc3Px++WIkDsXZP6g="; }; buildInputs = [ prev.makeWrapper ]; phases = ["unpackPhase" "patchPhase" "installPhase"]; unpackPhase = '' install -m 0644 $src wifi2qr ''; patchPhase = '' ${prev.gnused}/bin/sed -ri 's|#!/bin/bash|#!${final.bash}/bin/bash|' wifi2qr ''; installPhase = '' mkdir -p $out/bin install -m 0755 -t $out/bin wifi2qr wrapProgram $out/bin/wifi2qr \ --set PATH ${final.which}/bin:${final.coreutils}/bin:${final.gnugrep}/bin:${final.gnused}/bin:${final.libqrencode}/bin:${final.networkmanager}/bin ''; }; }