rtl8723cs-wowlan: remove dependency on moreutils
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
# - portfolio -> {glib,cairo,pygobject}-dev
|
# - portfolio -> {glib,cairo,pygobject}-dev
|
||||||
# - komikku -> python3.10-brotlicffi -> python3.10-cffi
|
# - komikku -> python3.10-brotlicffi -> python3.10-cffi
|
||||||
# - many others. python3.10-cffi seems to be the offender which infects 70% of consumers though
|
# - many others. python3.10-cffi seems to be the offender which infects 70% of consumers though
|
||||||
# - 2023/10/10: moreutils pulls in unnecessarily many emulated deps
|
|
||||||
# - 2023/10/11: build ruby is pulled in by `neovim`:
|
# - 2023/10/11: build ruby is pulled in by `neovim`:
|
||||||
# - nix why-depends --all /nix/store/rhli8vhscv93ikb43639c2ysy3a6dmzp-nixos-system-moby-23.11.20231011.30c7fd8 /nix/store/5xbwwbyjmc1xvjzhghk6r89rn4ylidv8-ruby-3.1.4
|
# - nix why-depends --all /nix/store/rhli8vhscv93ikb43639c2ysy3a6dmzp-nixos-system-moby-23.11.20231011.30c7fd8 /nix/store/5xbwwbyjmc1xvjzhghk6r89rn4ylidv8-ruby-3.1.4
|
||||||
# - 2023/10/11: build coreutils pulled in by rpm
|
# - 2023/10/11: build coreutils pulled in by rpm
|
||||||
@@ -1234,13 +1233,6 @@ in {
|
|||||||
# # '';
|
# # '';
|
||||||
# });
|
# });
|
||||||
|
|
||||||
moreutils = prev.moreutils.override {
|
|
||||||
# depends on perl IPC-Run -> IO-Tty, the latter does not cross
|
|
||||||
# - IO-Tty stands very small chance of ever compiling w/o straight up emulation.
|
|
||||||
# N.B. only perl+perlPackages have to be emulated, but emulating stdenv actually reduces the closure
|
|
||||||
inherit (emulated) perl perlPackages stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
mpv-unwrapped = prev.mpv-unwrapped.overrideAttrs (upstream: {
|
mpv-unwrapped = prev.mpv-unwrapped.overrideAttrs (upstream: {
|
||||||
# 2023/10/10: upstreaming is easiest to do after the next staging -> master merge
|
# 2023/10/10: upstreaming is easiest to do after the next staging -> master merge
|
||||||
# otherwise the result will still have a transient dep on python.
|
# otherwise the result will still have a transient dep on python.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{ static-nix-shell
|
{ static-nix-shell
|
||||||
|
, hostname-debian
|
||||||
, iw
|
, iw
|
||||||
, moreutils
|
|
||||||
, wirelesstools
|
, wirelesstools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ static-nix-shell.mkPython3Bin {
|
|||||||
pname = "rtl8723cs-wowlan";
|
pname = "rtl8723cs-wowlan";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
pkgs = {
|
pkgs = {
|
||||||
inherit iw moreutils wirelesstools;
|
inherit hostname-debian iw wirelesstools;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p iw -p moreutils -p wirelesstools
|
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p hostname-debian -p iw -p wirelesstools
|
||||||
# vim: set filetype=python :
|
# vim: set filetype=python :
|
||||||
|
|
||||||
# common operations:
|
# common operations:
|
||||||
@@ -7,8 +7,6 @@
|
|||||||
# arp --dest-ip A.B.C.D
|
# arp --dest-ip A.B.C.D
|
||||||
# tcp --source-port N
|
# tcp --source-port N
|
||||||
|
|
||||||
KNOWN_INTERFACES = ("wlan0", "wlp3s0", "enp5s0")
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -21,17 +19,9 @@ def octet_to_hex(o: int) -> str:
|
|||||||
|
|
||||||
def get_ipaddrs() -> list['IpAddr']:
|
def get_ipaddrs() -> list['IpAddr']:
|
||||||
''' return the IP address of all known interfaces '''
|
''' return the IP address of all known interfaces '''
|
||||||
addrs = []
|
addrs = subprocess.check_output(['hostname', '--all-ip-addresses']).decode('utf-8').strip().split(' ')
|
||||||
for iface in KNOWN_INTERFACES:
|
logger.debug(f'get_ipaddrs got: {addrs}')
|
||||||
try:
|
return [ IpAddr(a) for a in addrs ]
|
||||||
# errors if interface isn't known, or ip addr fails to parse (e.g. 'NON-IP')
|
|
||||||
maybe_addr = subprocess.check_output(['ifdata', '-pa', iface]).decode('utf-8')
|
|
||||||
addr = IpAddr(maybe_addr)
|
|
||||||
except: pass
|
|
||||||
else:
|
|
||||||
addrs.append(addr)
|
|
||||||
logger.debug(f'get_ipaddrs got: {[str(a) for a in addrs]}')
|
|
||||||
return addrs
|
|
||||||
|
|
||||||
|
|
||||||
class Encodable:
|
class Encodable:
|
||||||
|
Reference in New Issue
Block a user