{ stdenv, buildEnv, glibcStatic, rebase, }: rec { dnsmasq = stdenv.mkDerivation rec { pname = "dnsmasq"; version = "2.85"; src = builtins.fetchurl { url = "https://www.thekelleys.org.uk/dnsmasq/${pname}-${version}.tar.xz"; sha256 = "sha256-rZjTgD32h+W5OAgPPSXGKP5ByHh1LQP7xhmXh/7jEvo="; }; nativeBuildInputs = [ glibcStatic ]; makeFlags = [ "LDFLAGS=-static" "DESTDIR=" "BINDIR=$(out)/bin" "MANDIR=$(out)/man" "LOCALEDIR=$(out)/share/locale" ]; }; env = buildEnv { name = "cryptic-net-dnsmasq"; paths = [ (rebase "cryptic-net-dnsmasq-bin" ./bin "bin") (rebase "cryptic-net-dnsmasq-etc" ./etc "etc/dnsmasq") dnsmasq ]; }; }