e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
36 lines
1.0 KiB
Nix
36 lines
1.0 KiB
Nix
{ lib, stdenv, fetchurl, libresolv, perl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.10";
|
|
pname = "dnstracer";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.mavetju.org/download/${pname}-${version}.tar.bz2";
|
|
sha256 = "089bmrjnmsga2n0r4xgw4bwbf41xdqsnmabjxhw8lngg2pns1kb4";
|
|
};
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
nativeBuildInputs = [ perl /* for pod2man */ ];
|
|
|
|
setOutputFlags = false;
|
|
|
|
installPhase = ''
|
|
install -Dm755 -t $out/bin dnstracer
|
|
install -Dm755 -t $man/share/man/man8 dnstracer.8
|
|
'';
|
|
|
|
buildInputs = [] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libresolv ];
|
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lresolv";
|
|
|
|
meta = with lib; {
|
|
description = "Determines where a given Domain Name Server (DNS) gets its information from, and follows the chain of DNS servers back to the servers which know the data";
|
|
homepage = "http://www.mavetju.org/unix/general.php";
|
|
license = licenses.bsd2;
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
mainProgram = "dnstracer";
|
|
};
|
|
}
|