mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 21:04:30 +00:00
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" ```
31 lines
865 B
Nix
31 lines
865 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "dbd";
|
|
version = "1.50-unstable-2016-01-04";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gitdurandal";
|
|
repo = "dbd";
|
|
rev = "8cf5350781b6753fcdd863148a5dcc6976e693ca";
|
|
hash = "sha256-b2yBZ2/Ab+SviKNlyZgdfiZ7GGZ1sonZnblD0i+vuFw=";
|
|
};
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder "out"}"
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "darwin" ] ++ lib.optionals (stdenv.hostPlatform.isUnix && !stdenv.hostPlatform.isDarwin) [ "unix" ];
|
|
|
|
meta = with lib; {
|
|
description = "Netcat-clone, designed to be portable and offer strong encryption";
|
|
mainProgram = "dbd";
|
|
homepage = "https://github.com/gitdurandal/dbd";
|
|
maintainers = with maintainers; [ d3vil0p3r ];
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl2Plus;
|
|
};
|
|
}
|