@@ -0,0 +1,48 @@
1+{ stdenv, fetchFromGitHub, python }:
2+
3+stdenv.mkDerivation rec {
4+
5+ version = "0.9.8";
6+ pname = "charliecloud";
7+
8+ src = fetchFromGitHub {
9+ owner = "hpc";
10+ repo = "charliecloud";
11+ rev = "v${version}";
12+ sha256 = "1w1wy4sj9zqfysrpf04shhppcf5ap4rp7i3ja81sv2fm27k4m9nl";
13+ };
14+
15+ buildInputs = [ python ];
16+
17+ preConfigure = ''
18+ substituteInPlace Makefile --replace '/bin/bash' '${stdenv.shell}'
19+ patchShebangs test/
20+ '';
21+
22+ makeFlags = [
23+ "PREFIX=$(out)"
24+ "LIBEXEC_DIR=lib/charliecloud"
25+ ];
26+
27+ postInstall = ''
28+ mkdir -p $out/share/charliecloud
29+ mv $out/lib/charliecloud/examples $out/share/charliecloud
30+ mv $out/lib/charliecloud/test $out/share/charliecloud
31+ '';
32+
33+ meta = {
34+ description = "User-defined software stacks (UDSS) for high-performance computing (HPC) centers";
35+ longDescription = ''
36+ Charliecloud uses Linux user namespaces to run containers with no
37+ privileged operations or daemons and minimal configuration changes on
38+ center resources. This simple approach avoids most security risks
39+ while maintaining access to the performance and functionality already
40+ on offer.
41+ '';
42+ homepage = https://hpc.github.io/charliecloud;
43+ license = stdenv.lib.licenses.asl20;
44+ maintainers = [ stdenv.lib.maintainers.bzizou ];
45+ platforms = stdenv.lib.platforms.linux;
46+ };
47+
48+}