From a2a5df1e632a247f44f64c7acf79e41a6327e270 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 24 Jul 2021 09:33:10 +0200 Subject: [PATCH 1/4] vbox-image: add new option to set free space in image (cherry picked from commit a6700d75f38cda83367a8af84651a2a72ce0f3ef) --- nixos/modules/virtualisation/virtualbox-image.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 071edda8269..d31921f95ea 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -18,6 +18,13 @@ in { The size of the VirtualBox base image in MiB. ''; }; + baseImageFreeSpace = mkOption { + type = with types; int; + default = 30 * 1024; + description = '' + Free space in the VirtualBox base image in MiB. + ''; + }; memorySize = mkOption { type = types.int; default = 1536; @@ -117,6 +124,7 @@ in { inherit pkgs lib config; partitionTableType = "legacy"; diskSize = cfg.baseImageSize; + additionalSpace = cfg.baseImageFreeSpace; postVM = '' From 2194711ae07e7bf51d7937fa2bd1a6ea0d292c1a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 1 Aug 2021 18:59:08 +0000 Subject: [PATCH 2/4] nixos/virtualbox-image: cast baseImageFreeSpace into str This fixes an evaluation error that's blocking the nixos-unstable channel (#132328). (cherry picked from commit b5fab53628e8f080bae24ea1396f72d9d21e1f9b) --- nixos/modules/virtualisation/virtualbox-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index d31921f95ea..cd356b9d382 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -124,7 +124,7 @@ in { inherit pkgs lib config; partitionTableType = "legacy"; diskSize = cfg.baseImageSize; - additionalSpace = cfg.baseImageFreeSpace; + additionalSpace = "${toString cfg.baseImageFreeSpace}M"; postVM = '' From 3d3ced33c948b85032364fd657e5a74126652b49 Mon Sep 17 00:00:00 2001 From: Kazutoshi Noguchi Date: Tue, 6 Jul 2021 17:12:28 +0900 Subject: [PATCH 3/4] nixos/binfmt: run binfmt activation script after mounting /run binfmt activation script creates /run/binfmt before mounting /run when system activation. To fix it I added dependency to specialfs to binfmt activation script. (cherry picked from commit bf227785854c9fd4a14c20db12dd6d3ebaf02981) --- nixos/modules/system/boot/binfmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index cbdf581d73a..2408ecc80d2 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkOption types optionalString; + inherit (lib) mkOption types optionalString stringAfter; cfg = config.boot.binfmt; @@ -270,7 +270,7 @@ in { environment.etc."binfmt.d/nixos.conf".source = builtins.toFile "binfmt_nixos.conf" (lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine config.boot.binfmt.registrations)); - system.activationScripts.binfmt = '' + system.activationScripts.binfmt = stringAfter [ "specialfs" ] '' mkdir -p -m 0755 /run/binfmt ${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet config.boot.binfmt.registrations)} ''; From fbec1356fadb9dee225457449bba2dda746f5f6e Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 2 Aug 2021 17:57:09 +0300 Subject: [PATCH 4/4] perlPackages.PerlMagick: 7.0.10 -> 7.0.11-1 (cherry picked from commit 55692c5a0a65a18947431f323aad73baa53c824f) --- pkgs/top-level/perl-packages.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index d34d4f48980..9bf212761a9 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -16971,20 +16971,15 @@ let PerlMagick = buildPerlPackage rec { pname = "PerlMagick"; - version = "7.0.10"; + version = "7.0.11-1"; src = fetchurl { - url = "mirror://cpan/authors/id/J/JC/JCRISTY/PerlMagick-${version}.tar.gz"; - sha256 = "1x05hdb3b6qs36x958b4w46qanvkqm6rpc44rlq4rd2w3gbp4lhx"; + url = "mirror://cpan/authors/id/J/JC/JCRISTY/Image-Magick-${version}.tar.gz"; + sha256 = "sha256-c0vuFmVq9bypQABBnZElGIQrpkYKwtD/B+PloBAycuI="; }; buildInputs = [ pkgs.imagemagick ]; preConfigure = '' sed -i -e 's|my \$INC_magick = .*|my $INC_magick = "-I${pkgs.imagemagick.dev}/include/ImageMagick";|' Makefile.PL - - # Enable HDRI support to match the native ImageMagick 7 defaults - # See: https://github.com/ImageMagick/ImageMagick/issues/3402#issuecomment-801195538 - substituteInPlace Makefile.PL \ - --replace 'MAGICKCORE_HDRI_ENABLE=0' 'MAGICKCORE_HDRI_ENABLE=1' ''; };