1 { lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, networkmanager, iw, Security }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-DPMCwyKqGJrav0wASBky9bS1bvJ3xaGsDzsk1bKaH1U=";
14 cargoHash = "sha256-TL7ZsRbpRdYymJHuoCUCqe/U3Vacb9mtKFh85IOl+PA=";
16 nativeBuildInputs = [ makeWrapper ];
17 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
20 wrapProgram "$out/bin/ifwifi" \
21 --prefix PATH : "${lib.makeBinPath (
22 # `ifwifi` runtime dep
24 # `wifiscanner` crate's runtime deps
25 ++ (lib.optional stdenv.hostPlatform.isLinux iw)
26 # ++ (lib.optional stdenv.hostPlatform.isDarwin airport) # airport isn't packaged
33 description = "Simple wrapper over nmcli using wifiscanner made in rust";
34 mainProgram = "ifwifi";
36 In the author's words:
38 I felt bothered because I never remember the long and tedious command
39 line to setup my wifi interface. So, I wanted to develop something
40 using rust to simplify the usage of nmcli, and I met the wifiscanner
41 project that gave me almost everything I wanted to create this tool.
43 homepage = "https://github.com/araujobsd/ifwifi";
44 license = with licenses; [ bsd2 ];
45 maintainers = with maintainers; [ blaggacao ];
46 # networkmanager doesn't work on darwin
47 # even though the `wifiscanner` crate would work
48 platforms = with platforms; linux; # ++ darwin;