schedtool: fix build with gcc 13 (#368504)

This commit is contained in:
Masum Reza 2024-12-31 12:06:27 +05:30 committed by GitHub
commit e9620136c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,28 +4,34 @@
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "schedtool";
version = "1.3.0";
src = fetchFromGitHub {
owner = "freequaos";
repo = "schedtool";
rev = "${pname}-${version}";
sha256 = "1wdw6fnf9a01xfjhdah3mn8bp1bvahf2lfq74i6hk5b2cagkppyp";
rev = "schedtool-${finalAttrs.version}";
hash = "sha256-1987n2JilQlNJAc7KhxUe4W7kK0Dqgal6wGo5KwzvPE=";
};
# Fix build with GCC 13
postPatch = ''
substituteInPlace schedtool.c \
--replace-fail 'TAB[policy] : policy' 'TAB[policy] : (char*)(intptr_t)policy'
'';
makeFlags = [
"DESTDIR=$(out)"
"DESTPREFIX="
];
meta = with lib; {
meta = {
description = "Query or alter a process' scheduling policy under Linux";
mainProgram = "schedtool";
homepage = "https://freequaos.host.sk/schedtool/";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
homepage = "https://github.com/freequaos/schedtool";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ abbradar ];
};
}
})