Files
nixpkgs/pkgs/by-name/pr/prctl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
versionCheckHook,
nix-update-script,
bash,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "prctl";
version = "1.7";
src = fetchFromGitHub {
owner = "hikerockies";
repo = "prctl";
tag = "v${finalAttrs.version}";
hash = "sha256-1b8SO70mp0ACL3hw/iwKpPUpI5G7hF7l84hlSDHB2oA=";
};
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
nativeInstallCheckInputs = [ versionCheckHook ];
patches = [
# Eliminate unsafe strcpy() calls,
# cf. <https://github.com/hikerockies/prctl/pull/1>
./prctl-strcpy-overflow.patch
# Correct option parsing,
# cf. <https://github.com/hikerockies/prctl/pull/2>
./prctl-getopt.patch
];
postPatch = ''
substituteInPlace prctl.c \
--replace-fail '"/bin/bash"' '"${lib.getExe bash}"'
'';
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Tool to query and modify process behaviour";
homepage = "https://tracker.debian.org/pkg/prctl";
changelog = "https://github.com/hikerockies/prctl/blob/v${finalAttrs.version}/ChangeLog";
mainProgram = "prctl";
maintainers = with lib.maintainers; [ mvs ];
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
};
})