Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3887b6bf3a5f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 65e5bc713bcc
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 12, 2018

  1. singularity: 2.4 -> 2.4.2

    jbedo committed Mar 12, 2018
    5
    Copy the full SHA
    5c1e422 View commit details

Commits on Mar 14, 2018

  1. Merge pull request #36845 from jbedo/singularity

    singularity: 2.4 -> 2.4.2
    nlewo authored Mar 14, 2018
    Copy the full SHA
    65e5bc7 View commit details
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 20 additions & 0 deletions nixos/modules/programs/singularity.nix
Original file line number Diff line number Diff line change
@@ -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 -"];
};

}
7 changes: 5 additions & 2 deletions pkgs/applications/virtualization/singularity/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
1 change: 1 addition & 0 deletions pkgs/build-support/singularity-tools/default.nix
Original file line number Diff line number Diff line change
@@ -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
'');