mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-20 11:11:43 -04: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" ```
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchgit
|
|
, buildPackages
|
|
, docbook_xml_dtd_44
|
|
, docbook_xsl
|
|
, withLibcap ? stdenv.hostPlatform.isLinux, libcap
|
|
, pkg-config
|
|
, meson
|
|
, ninja
|
|
, xmlto
|
|
, python3
|
|
|
|
, gitUpdater
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pax-utils";
|
|
version = "1.3.7";
|
|
|
|
src = fetchgit {
|
|
url = "https://anongit.gentoo.org/git/proj/pax-utils.git";
|
|
rev = "v${version}";
|
|
hash = "sha256-WyNng+UtfRz1+Eu4gwXLxUvBAg+m3mdrc8GdEPYRKVE=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
mesonFlags = [
|
|
(lib.mesonEnable "use_libcap" withLibcap)
|
|
];
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
nativeBuildInputs = [ docbook_xml_dtd_44 docbook_xsl meson ninja pkg-config xmlto ];
|
|
buildInputs = lib.optionals withLibcap [ libcap ];
|
|
# Needed for lddtree
|
|
propagatedBuildInputs = [ (python3.withPackages (p: with p; [ pyelftools ])) ];
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
url = "https://anongit.gentoo.org/git/proj/pax-utils.git";
|
|
rev-prefix = "v";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "ELF utils that can check files for security relevant properties";
|
|
longDescription = ''
|
|
A suite of ELF tools to aid auditing systems. Contains
|
|
various ELF related utils for ELF32, ELF64 binaries useful
|
|
for displaying PaX and security info on a large groups of
|
|
binary files.
|
|
'';
|
|
homepage = "https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ thoughtpolice joachifm ];
|
|
};
|
|
}
|