diff options
author | Daniƫl de Kok <me@danieldk.eu> | 2020-08-28 16:34:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 16:34:57 +0200 |
commit | 192ed0a00ec4e6796a7d170163ad670e909b494f (patch) | |
tree | 56b8a3a110807ca304b621b82a7f87ba9b9d89ae /pkgs | |
parent | 9369f74fb28fbf7e79ffe102e3a3dbdef3b2981e (diff) | |
parent | 1601ff7dd4941e8cd5b4b5429820daa4d32f36f2 (diff) |
Merge pull request #95888 from bzizou/charliecloud18
charliecloud: 0.12 -> 0.18
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/virtualization/charliecloud/default.nix | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/pkgs/applications/virtualization/charliecloud/default.nix b/pkgs/applications/virtualization/charliecloud/default.nix index a316952a010d..54663f9c5e6e 100644 --- a/pkgs/applications/virtualization/charliecloud/default.nix +++ b/pkgs/applications/virtualization/charliecloud/default.nix @@ -1,22 +1,32 @@ -{ stdenv, fetchFromGitHub, python }: +{ stdenv, fetchFromGitHub, python3, python3Packages, docker, autoreconfHook, coreutils, makeWrapper, gnused, gnutar, gzip, findutils, sudo, nixosTests }: stdenv.mkDerivation rec { - version = "0.12"; + version = "0.18"; pname = "charliecloud"; src = fetchFromGitHub { owner = "hpc"; repo = "charliecloud"; rev = "v${version}"; - sha256 = "177rcf1klcxsp6x9cw75cmz3y2izgd1hvi1rb9vc6iz9qx1nmk3v"; + sha256 = "0x2kvp95ld0yii93z9i0k9sknfx7jkgy4rkw9l369fl7f73ghsiq"; }; - buildInputs = [ python ]; + nativeBuildInputs = [ autoreconfHook makeWrapper ]; + buildInputs = [ + docker + (python3.withPackages (ps: [ ps.lark-parser ps.requests ])) + ]; + + configureFlags = let + pythonEnv = python3.withPackages (ps: [ ps.lark-parser ps.requests ]); + in [ + "--with-python=${pythonEnv}/bin/python3" + ]; preConfigure = '' - substituteInPlace Makefile --replace '/bin/bash' '${stdenv.shell}' patchShebangs test/ + substituteInPlace configure.ac --replace "/usr/bin/env" "${coreutils}/bin/env" ''; makeFlags = [ @@ -24,12 +34,16 @@ stdenv.mkDerivation rec { "LIBEXEC_DIR=lib/charliecloud" ]; + # Charliecloud calls some external system tools. + # Here we wrap those deps so they are resolved inside nixpkgs. postInstall = '' - mkdir -p $out/share/charliecloud - mv $out/lib/charliecloud/examples $out/share/charliecloud - mv $out/lib/charliecloud/test $out/share/charliecloud + for file in $out/bin/* ; do \ + wrapProgram $file --prefix PATH : ${stdenv.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 = '' |