forked from mirrors/nixpkgs
singularity: 2.4 -> 2.4.2
This commit is contained in:
parent
e065aa949a
commit
5c1e42276d
|
@ -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
|
||||
|
|
20
nixos/modules/programs/singularity.nix
Normal file
20
nixos/modules/programs/singularity.nix
Normal 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 -"];
|
||||
};
|
||||
|
||||
}
|
|
@ -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 ];
|
||||
|
|
|
@ -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
|
||||
'');
|
||||
|
||||
|
|
Loading…
Reference in a new issue