nixpkgs/pkgs/by-name/tr/tracexec/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.1 KiB
Nix
Raw Normal View History

2024-05-15 01:30:45 +00:00
{
lib,
stdenv,
2024-05-15 01:30:45 +00:00
fetchFromGitHub,
rustPlatform,
cargo-about,
nix-update-script,
2024-05-15 01:30:45 +00:00
}:
let
2024-05-15 01:30:45 +00:00
pname = "tracexec";
2024-08-13 09:43:26 +00:00
version = "0.5.2";
in
rustPlatform.buildRustPackage {
inherit pname version;
2024-05-15 01:30:45 +00:00
src = fetchFromGitHub {
owner = "kxxt";
repo = "tracexec";
rev = "refs/tags/v${version}";
2024-08-13 09:43:26 +00:00
hash = "sha256-PLUB0t9eDR0mYUI6TiUxafo6yMymwdTux7ykF8rTGGc=";
2024-05-15 01:30:45 +00:00
};
2024-08-13 09:43:26 +00:00
cargoHash = "sha256-PJclGjQTAOvnl8LJTxlDyEuzdWE1R7A2gJe1I1sKde0=";
2024-05-15 01:30:45 +00:00
2024-07-21 10:28:42 +00:00
nativeBuildInputs = [ cargo-about ];
# Remove RiscV64 specialisation when this is fixed:
# * https://github.com/NixOS/nixpkgs/pull/310158#pullrequestreview-2046944158
# * https://github.com/rust-vmm/seccompiler/pull/72
cargoBuildFlags = lib.optional stdenv.hostPlatform.isRiscV64 "--no-default-features";
preBuild = ''
sed -i '1ino-clearly-defined = true' about.toml # disable network requests
cargo about generate --config about.toml -o THIRD_PARTY_LICENSES.HTML about.hbs
'';
# Tests don't work for native non-x86 compilation
# because upstream overrides the name of the linker executables,
# see https://github.com/NixOS/nixpkgs/pull/310158#issuecomment-2118845043
doCheck = stdenv.hostPlatform.isx86_64;
checkFlags = [
"--skip=cli::test::log_mode_without_args_works" # `Permission denied` (needs `CAP_SYS_PTRACE`)
"--skip=tracer::test::tracer_emits_exec_event" # needs `/bin/true`
];
2024-05-15 01:30:45 +00:00
postInstall = ''
# Remove test binaries (e.g. `empty-argv`, `corrupted-envp`) and only retain `tracexec`
2024-05-15 01:30:45 +00:00
find "$out/bin" -type f \! -name tracexec -print0 | xargs -0 rm -v
treewide: change `${pname}` to string literal (#336172) * adwaita-icon-theme: change `${pname}` to string literal * alp: change `${pname}` to string literal * alsa-oss: change `${pname}` to string literal * alsa-plugins: change `${pname}` to string literal * alsa-ucm-conf: change `${pname}` to string literal * alsa-utils: change `${pname}` to string literal * anyrun: change `${pname}` to string literal * assemblyscript: change `${pname}` to string literal * audiobookshelf: change `${pname}` to string literal * baobab: change `${pname}` to string literal * braa: change `${pname}` to string literal * brill: change `${pname}` to string literal * centrifugo: change `${pname}` to string literal * cheese: change `${pname}` to string literal * cljfmt: change `${pname}` to string literal * coppwr: change `${pname}` to string literal * cosmic-edit: change `${pname}` to string literal * cosmic-files: change `${pname}` to string literal * cosmic-store: change `${pname}` to string literal * cosmic-term: change `${pname}` to string literal * crate2nix: change `${pname}` to string literal * cups-kyocera-3500-4500: change `${pname}` to string literal * dbqn: change `${pname}` to string literal * dconf-editor: change `${pname}` to string literal * devhelp: change `${pname}` to string literal * dmarc-report-converter: change `${pname}` to string literal * engage: change `${pname}` to string literal * eog: change `${pname}` to string literal * evolution-data-server-gtk4: change `${pname}` to string literal * find-billy: change `${pname}` to string literal * firefly-iii: change `${pname}` to string literal * fuchsia-cursor: change `${pname}` to string literal * geary: change `${pname}` to string literal * ghex: change `${pname}` to string literal * gitg: change `${pname}` to string literal * glasskube: change `${pname}` to string literal * gnome.gnome-autoar: change `${pname}` to string literal * gnome.gnome-calculator: change `${pname}` to string literal * gnome.gnome-calendar: change `${pname}` to string literal * gnome.gnome-common: change `${pname}` to string literal * gnome.gnome-dictionary: change `${pname}` to string literal * gnome.gnome-disk-utility: change `${pname}` to string literal * gnome.gnome-font-viewer: change `${pname}` to string literal * gnome.gnome-keyring: change `${pname}` to string literal * gnome.gnome-screenshot: change `${pname}` to string literal * gnome.gnome-system-monitor: change `${pname}` to string literal * gnome.seahorse: change `${pname}` to string literal * gnome.simple-scan: change `${pname}` to string literal * gnome.sushi: change `${pname}` to string literal * gnome.totem: change `${pname}` to string literal * gnome.yelp: change `${pname}` to string literal * gnome.yelp-xsl: change `${pname}` to string literal * gnucap-full: change `${pname}` to string literal * goredo: change `${pname}` to string literal * guile-semver: change `${pname}` to string literal * halo: change `${pname}` to string literal * intiface-central: change `${pname}` to string literal * intune-portal: change `${pname}` to string literal * iscc: change `${pname}` to string literal * jetbrains-toolbox: change `${pname}` to string literal * jnr-posix: change `${pname}` to string literal * keymapp: change `${pname}` to string literal * libation: change `${pname}` to string literal * libeduvpn-common: change `${pname}` to string literal * libmamba: change `${pname}` to string literal * littlefs-fuse: change `${pname}` to string literal * logseq: change `${pname}` to string literal * lxgw-wenkai-tc: change `${pname}` to string literal * microsoft-identity-broker: change `${pname}` to string literal * minetest-mapserver: change `${pname}` to string literal * msalsdk-dbusclient: change `${pname}` to string literal * neverest: change `${pname}` to string literal * nf-test: change `${pname}` to string literal * numbat: change `${pname}` to string literal * pdf2odt: change `${pname}` to string literal * plemoljp: change `${pname}` to string literal * plemoljp-hs: change `${pname}` to string literal * plemoljp-nf: change `${pname}` to string literal * pocket-updater-utility: change `${pname}` to string literal * proto: change `${pname}` to string literal * pw3270: change `${pname}` to string literal * ratchet: change `${pname}` to string literal * read-it-later: change `${pname}` to string literal * redmine: change `${pname}` to string literal * regina: change `${pname}` to string literal * regripper: change `${pname}` to string literal * revolt-desktop: change `${pname}` to string literal * rs: change `${pname}` to string literal * signaturepdf: change `${pname}` to string literal * sonarlint-ls: change `${pname}` to string literal * srgn: change `${pname}` to string literal * stackit-cli: change `${pname}` to string literal * substudy: change `${pname}` to string literal * swayosd: change `${pname}` to string literal * synthesia: change `${pname}` to string literal * tarlz: change `${pname}` to string literal * termcap: change `${pname}` to string literal * tinycompress: change `${pname}` to string literal * tracexec: change `${pname}` to string literal * treefmt2: change `${pname}` to string literal * udev-gothic: change `${pname}` to string literal * udev-gothic-nf: change `${pname}` to string literal * vvvvvv: change `${pname}` to string literal * yggdrasil: change `${pname}` to string literal * zsync: change `${pname}` to string literal
2024-08-20 22:56:55 +00:00
install -Dm644 LICENSE -t "$out/share/licenses/tracexec/"
install -Dm644 THIRD_PARTY_LICENSES.HTML -t "$out/share/licenses/tracexec/"
2024-05-15 01:30:45 +00:00
'';
passthru.updateScript = nix-update-script { };
2024-05-15 01:30:45 +00:00
meta = {
changelog = "https://github.com/kxxt/tracexec/blob/v${version}/CHANGELOG.md";
2024-05-15 01:30:45 +00:00
description = "Small utility for tracing execve{,at} and pre-exec behavior";
homepage = "https://github.com/kxxt/tracexec";
license = lib.licenses.gpl2Plus;
2024-05-15 01:30:45 +00:00
mainProgram = "tracexec";
2024-07-21 10:28:42 +00:00
maintainers = with lib.maintainers; [
fpletz
nh2
];
2024-05-15 01:30:45 +00:00
platforms = lib.platforms.linux;
};
}