From ce335982e5346d8c71f82ac745c478e194be3025 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 7 Jan 2022 21:43:04 +0100 Subject: gkleen@sif: wifi2qr --- overlays/wifi2qr.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 overlays/wifi2qr.nix (limited to 'overlays') diff --git a/overlays/wifi2qr.nix b/overlays/wifi2qr.nix new file mode 100644 index 00000000..72b1535f --- /dev/null +++ b/overlays/wifi2qr.nix @@ -0,0 +1,29 @@ +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 + ''; + }; +} -- cgit v1.2.3