Merge pull request #36845 from jbedo/singularity

singularity: 2.4 -> 2.4.2
This commit is contained in:
lewo 2018-03-14 10:19:10 +01:00 committed by GitHub
commit 65e5bc713b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 2 deletions

View File

@ -104,6 +104,7 @@
./programs/shadow.nix
./programs/shell.nix
./programs/spacefm.nix
./programs/singularity.nix
./programs/ssh.nix
./programs/ssmtp.nix
./programs/sysdig.nix

View File

@ -0,0 +1,20 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.singularity;
in {
options.programs.singularity = {
enable = mkEnableOption "Singularity";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.singularity ];
systemd.tmpfiles.rules = [ "d /var/singularity/mnt/session 0770 root root -"
"d /var/singularity/mnt/final 0770 root root -"
"d /var/singularity/mnt/overlay 0770 root root -"
"d /var/singularity/mnt/container 0770 root root -"
"d /var/singularity/mnt/source 0770 root root -"];
};
}

View File

@ -17,7 +17,7 @@
stdenv.mkDerivation rec {
name = "singularity-${version}";
version = "2.4";
version = "2.4.2";
enableParallelBuilding = true;
@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
patchShebangs .
'';
configureFlags = "--localstatedir=/var";
installFlags = "CONTAINER_MOUNTDIR=dummy CONTAINER_FINALDIR=dummy CONTAINER_OVERLAY=dummy SESSIONDIR=dummy";
fixupPhase = ''
patchShebangs $out
for f in $out/libexec/singularity/helpers/help.sh $out/libexec/singularity/cli/*.exec $out/libexec/singularity/bootstrap-scripts/*.sh ; do
@ -42,7 +45,7 @@ stdenv.mkDerivation rec {
owner = "singularityware";
repo = "singularity";
rev = version;
sha256 = "1hi1ag1lb2x4djbz4x34wix83ymx0g9mzn2md6yrpiflc1d85rjz";
sha256 = "0cpa2yp82g9j64mgr90p75ddk85kbj1qi1r6hy0sz17grqdlaxl4";
};
nativeBuildInputs = [ autoreconfHook makeWrapper ];

View File

@ -96,6 +96,7 @@ rec {
echo creating
singularity image.create -s $((1 + size * 4 / 1024 + ${toString extraSpace})) $out
echo importing
mkdir -p /var/singularity/mnt/container
tar -c . | singularity image.import $out
'');