nixpkgs/pkgs/by-name/lx/lxcfs/package.nix

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

82 lines
1.7 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchFromGitHub,
fuse3,
help2man,
makeWrapper,
meson,
ninja,
2024-03-30 02:29:52 +00:00
nix-update-script,
nixosTests,
pkg-config,
python3,
util-linux,
}:
2016-11-21 13:11:40 +00:00
stdenv.mkDerivation rec {
2020-08-14 20:09:18 +00:00
pname = "lxcfs";
2024-03-30 02:29:52 +00:00
version = "6.0.0";
2016-11-21 13:11:40 +00:00
2017-03-01 22:02:53 +00:00
src = fetchFromGitHub {
owner = "lxc";
repo = "lxcfs";
2024-03-30 02:29:52 +00:00
rev = "v${version}";
sha256 = "sha256-Mx2ZTul3hUEL9SloYSOh+MGoc2QmZg88MTsfIOvaIZU=";
2016-11-21 13:11:40 +00:00
};
patches = [
# skip RPM spec generation
./no-spec.patch
# skip installing systemd files
./skip-init.patch
# fix pidfd checks and include
./pidfd.patch
];
2016-11-21 13:11:40 +00:00
nativeBuildInputs = [
meson
help2man
makeWrapper
ninja
(python3.withPackages (p: [ p.jinja2 ]))
pkg-config
2016-11-21 13:11:40 +00:00
];
buildInputs = [ fuse3 ];
2016-11-21 13:11:40 +00:00
preConfigure = ''
patchShebangs tools/
'';
2016-11-21 13:11:40 +00:00
postInstall = ''
2020-11-24 15:29:28 +00:00
# `mount` hook requires access to the `mount` command from `util-linux`:
wrapProgram "$out/share/lxcfs/lxc.mount.hook" --prefix PATH : "${util-linux}/bin"
'';
2016-11-21 13:11:40 +00:00
postFixup = ''
# liblxcfs.so is reloaded with dlopen()
patchelf --set-rpath "$(patchelf --print-rpath "$out/bin/lxcfs"):$out/lib" "$out/bin/lxcfs"
'';
passthru = {
tests = {
incus-container-legacy-init = nixosTests.incus.container-legacy-init;
incus-container-systemd-init = nixosTests.incus.container-systemd-init;
};
2024-03-30 02:29:52 +00:00
updateScript = nix-update-script { };
};
2016-11-21 13:11:40 +00:00
meta = {
description = "FUSE filesystem for LXC";
mainProgram = "lxcfs";
2020-08-14 20:09:18 +00:00
homepage = "https://linuxcontainers.org/lxcfs";
changelog = "https://linuxcontainers.org/lxcfs/news/";
2023-12-02 14:41:13 +00:00
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = lib.teams.lxc.members;
2016-11-21 13:11:40 +00:00
};
}