libcap_ng: modernize, adopt (#420001)
This commit is contained in:
@@ -1,18 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
autoreconfHook,
|
||||
swig,
|
||||
testers,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libcap-ng";
|
||||
version = "0.8.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${version}.tar.gz";
|
||||
hash = "sha256-O6UpTRy9+pivqs+8ALavntK4PoohgXGF39hEzIx6xv8=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stevegrubb";
|
||||
repo = "libcap-ng";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-qcHIHG59PDPfPsXA1r4hG4QhK2qyE7AgXOwUDjIy7lE=";
|
||||
};
|
||||
|
||||
# NEWS needs to exist or else the build fails
|
||||
postPatch = ''
|
||||
touch NEWS
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
swig
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
@@ -23,10 +42,24 @@ stdenv.mkDerivation rec {
|
||||
"--without-python"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests = {
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
# assumption: build machine runs linux kernel 5.0 or newer
|
||||
# see https://github.com/stevegrubb/libcap-ng?tab=readme-ov-file#note-to-distributions
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
changelog = "https://people.redhat.com/sgrubb/libcap-ng/ChangeLog";
|
||||
description = "Library for working with POSIX capabilities";
|
||||
homepage = "https://people.redhat.com/sgrubb/libcap-ng/";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.lgpl21;
|
||||
pkgConfigModules = [ "libcap-ng" ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.lgpl21;
|
||||
maintainers = with lib.maintainers; [ grimmauld ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user