Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions pkgs/top-level/unixtools.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, buildEnv, runCommand, lib, stdenv }:
{ pkgs, buildEnv, runCommand, lib, stdenv, freebsd }:

# These are some unix tools that are commonly included in the /usr/bin
# and /usr/sbin directory under more normal distributions. Along with
Expand Down Expand Up @@ -59,6 +59,7 @@ let
arp = {
linux = pkgs.nettools;
darwin = pkgs.darwin.network_cmds;
freebsd = pkgs.freebsd.arp;
};
col = {
linux = pkgs.util-linux;
Expand All @@ -80,6 +81,7 @@ let
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.stdenv.cc.libc.getent
else pkgs.netbsd.getent;
darwin = pkgs.netbsd.getent;
freebsd = pkgs.freebsd.getent;
};
getopt = {
linux = pkgs.util-linux;
Expand All @@ -88,6 +90,7 @@ let
fdisk = {
linux = pkgs.util-linux;
darwin = pkgs.darwin.diskdev_cmds;
freebsd = pkgs.freebsd.fdisk;
};
fsck = {
linux = pkgs.util-linux;
Expand All @@ -100,10 +103,12 @@ let
hostname = {
linux = pkgs.nettools;
darwin = pkgs.darwin.shell_cmds;
freebsd = pkgs.freebsd.bin;
};
ifconfig = {
linux = pkgs.nettools;
darwin = pkgs.darwin.network_cmds;
freebsd = pkgs.freebsd.ifconfig;
};
killall = {
linux = pkgs.psmisc;
Expand All @@ -112,6 +117,7 @@ let
locale = {
linux = pkgs.glibc;
darwin = pkgs.darwin.adv_cmds;
freebsd = pkgs.freebsd.locale;
};
logger = {
linux = pkgs.util-linux;
Expand All @@ -123,18 +129,22 @@ let
mount = {
linux = pkgs.util-linux;
darwin = pkgs.darwin.diskdev_cmds;
freebsd = freebsd.mount;
};
netstat = {
linux = pkgs.nettools;
darwin = pkgs.darwin.network_cmds;
freebsd = pkgs.freebsd.netstat;
};
ping = {
linux = pkgs.iputils;
darwin = pkgs.darwin.network_cmds;
freebsd = freebsd.ping;
};
ps = {
linux = pkgs.procps;
darwin = pkgs.darwin.ps;
freebsd = pkgs.freebsd.bin;
};
quota = {
linux = pkgs.linuxquota;
Expand All @@ -143,6 +153,7 @@ let
route = {
linux = pkgs.nettools;
darwin = pkgs.darwin.network_cmds;
freebsd = pkgs.freebsd.route;
};
script = {
linux = pkgs.util-linux;
Expand All @@ -151,10 +162,12 @@ let
sysctl = {
linux = pkgs.procps;
darwin = pkgs.darwin.system_cmds;
freebsd = pkgs.freebsd.sysctl;
};
top = {
linux = pkgs.procps;
darwin = pkgs.darwin.top;
freebsd = pkgs.freebsd.top;
};
umount = {
linux = pkgs.util-linux;
Expand All @@ -171,8 +184,9 @@ let
linux = pkgs.procps;

# watch is the only command from procps that builds currently on
# Darwin. Unfortunately no other implementations exist currently!
# Darwin/FreeBSD. Unfortunately no other implementations exist currently!
darwin = pkgs.callPackage ../os-specific/linux/procps-ng {};
freebsd = pkgs.callPackage ../os-specific/linux/procps-ng {};
};
write = {
linux = pkgs.util-linux;
Expand All @@ -181,6 +195,7 @@ let
xxd = {
linux = pkgs.vim.xxd;
darwin = pkgs.vim.xxd;
freebsd = pkgs.vim.xxd;
};
};

Expand Down