1 { lib, stdenv, fetchFromGitHub, python3, docker, autoreconfHook, coreutils, makeWrapper, gnused, gnutar, gzip, findutils, sudo, nixosTests }:
3 stdenv.mkDerivation rec {
6 pname = "charliecloud";
8 src = fetchFromGitHub {
10 repo = "charliecloud";
12 sha256 = "sha256-kdaVlwE3vdCxsmJTOUwx8J+9UcBuXbKDwS2MHX2ZPPM=";
15 nativeBuildInputs = [ autoreconfHook makeWrapper ];
18 (python3.withPackages (ps: [ ps.lark ps.requests ]))
22 pythonEnv = python3.withPackages (ps: [ ps.lark ps.requests ]);
24 "--with-python=${pythonEnv}/bin/python3"
29 substituteInPlace configure.ac --replace "/usr/bin/env" "${coreutils}/bin/env"
34 "LIBEXEC_DIR=lib/charliecloud"
37 # Charliecloud calls some external system tools.
38 # Here we wrap those deps so they are resolved inside nixpkgs.
40 for file in $out/bin/* ; do \
41 wrapProgram $file --prefix PATH : ${lib.makeBinPath [ coreutils docker gnused gnutar gzip findutils sudo ]}
45 passthru.tests.charliecloud = nixosTests.charliecloud;
48 description = "User-defined software stacks (UDSS) for high-performance computing (HPC) centers";
50 Charliecloud uses Linux user namespaces to run containers with no
51 privileged operations or daemons and minimal configuration changes on
52 center resources. This simple approach avoids most security risks
53 while maintaining access to the performance and functionality already
56 homepage = "https://hpc.github.io/charliecloud";
57 license = lib.licenses.asl20;
58 maintainers = [ lib.maintainers.bzizou ];
59 platforms = lib.platforms.linux;