diff options
-rw-r--r-- | accounts/gkleen@sif/default.nix | 1 | ||||
-rw-r--r-- | overlays/wifi2qr.nix | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 52d6c29e..0bd82a3a 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -281,6 +281,7 @@ in { | |||
281 | xmonad worktime fira-code-symbols emacsclientDesktopItem | 281 | xmonad worktime fira-code-symbols emacsclientDesktopItem |
282 | libreoffice xournalpp wrappedChrome nixos-shell virt-viewer | 282 | libreoffice xournalpp wrappedChrome nixos-shell virt-viewer |
283 | freerdp gnome-icon-theme paper-icon-theme sshpassSecret | 283 | freerdp gnome-icon-theme paper-icon-theme sshpassSecret |
284 | wifi2qr | ||
284 | ]; | 285 | ]; |
285 | 286 | ||
286 | file = { | 287 | file = { |
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 @@ | |||
1 | final: prev: | ||
2 | let | ||
3 | rev = "407ceb7cc5b72598aed79fb59c5c8c545b951f8e"; | ||
4 | in { | ||
5 | wifi2qr = prev.stdenv.mkDerivation { | ||
6 | name = "wifi2qr"; | ||
7 | version = builtins.substring 0 8 rev; | ||
8 | src = prev.fetchurl { | ||
9 | url = "https://raw.githubusercontent.com/dlenski/wifi2qr/${rev}/wifi2qr"; | ||
10 | hash = "sha256-FmiSlYhq3SoUNaWMByvHGO91dFsc3Px++WIkDsXZP6g="; | ||
11 | }; | ||
12 | |||
13 | buildInputs = [ prev.makeWrapper ]; | ||
14 | |||
15 | phases = ["unpackPhase" "patchPhase" "installPhase"]; | ||
16 | unpackPhase = '' | ||
17 | install -m 0644 $src wifi2qr | ||
18 | ''; | ||
19 | patchPhase = '' | ||
20 | ${prev.gnused}/bin/sed -ri 's|#!/bin/bash|#!${final.bash}/bin/bash|' wifi2qr | ||
21 | ''; | ||
22 | installPhase = '' | ||
23 | mkdir -p $out/bin | ||
24 | install -m 0755 -t $out/bin wifi2qr | ||
25 | wrapProgram $out/bin/wifi2qr \ | ||
26 | --set PATH ${final.which}/bin:${final.coreutils}/bin:${final.gnugrep}/bin:${final.gnused}/bin:${final.libqrencode}/bin:${final.networkmanager}/bin | ||
27 | ''; | ||
28 | }; | ||
29 | } | ||