Files
nixpkgs/pkgs/by-name/ch/charliecloud/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

103 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
python3,
docker,
autoreconfHook,
coreutils,
makeWrapper,
gnused,
gnutar,
gzip,
findutils,
sudo,
nixosTests,
pkg-config,
fuse3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "charliecloud";
version = "0.38";
src = fetchFromGitHub {
owner = "hpc";
repo = "charliecloud";
tag = "v${finalAttrs.version}";
hash = "sha256-Mr2Qa1PRTarJ0I8nkH/Xsq8QN3OxOfL8tpl1lL1WV0c=";
};
nativeBuildInputs = [
autoreconfHook
makeWrapper
pkg-config
];
buildInputs = [
docker
fuse3
(python3.withPackages (ps: [
ps.lark
ps.requests
]))
];
configureFlags =
let
pythonEnv = python3.withPackages (ps: [
ps.lark
ps.requests
]);
in
[
"--with-python=${pythonEnv}/bin/python3"
"-disable-bundled-lark"
];
preConfigure = ''
patchShebangs test/
substituteInPlace configure.ac --replace-fail "/usr/bin/env" "${coreutils}/bin/env"
'';
makeFlags = [
"PREFIX=$(out)"
"LIBEXEC_DIR=lib/charliecloud"
];
# Charliecloud calls some external system tools.
# Here we wrap those deps so they are resolved inside nixpkgs.
postInstall = ''
for file in $out/bin/* ; do \
wrapProgram $file --prefix PATH : ${
lib.makeBinPath [
coreutils
docker
gnused
gnutar
gzip
findutils
sudo
]
}
done
'';
passthru.tests.charliecloud = nixosTests.charliecloud;
meta = {
description = "User-defined software stacks (UDSS) for high-performance computing (HPC) centers";
longDescription = ''
Charliecloud uses Linux user namespaces to run containers with no
privileged operations or daemons and minimal configuration changes on
center resources. This simple approach avoids most security risks
while maintaining access to the performance and functionality already
on offer.
'';
homepage = "https://hpc.github.io/charliecloud";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.bzizou ];
platforms = lib.platforms.linux;
};
})