From 809041ca1b3bfaa6f0ee29034b7c31f0c1200158 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 21 Jun 2018 01:47:08 +0200 Subject: [PATCH] Add version of Nix that's patched for low-RAM environments --- morepkgs/default.nix | 1 + morepkgs/pkgs/system/low-ram-nix/default.nix | 25 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 morepkgs/pkgs/system/low-ram-nix/default.nix diff --git a/morepkgs/default.nix b/morepkgs/default.nix index f7f2aea..a0f3096 100644 --- a/morepkgs/default.nix +++ b/morepkgs/default.nix @@ -2,5 +2,6 @@ self: super: { morepkgs = { xonotic = super.callPackage ./pkgs/games/xonotic {}; + low-ram-nix = super.callPackage ./pkgs/system/low-ram-nix {}; }; } diff --git a/morepkgs/pkgs/system/low-ram-nix/default.nix b/morepkgs/pkgs/system/low-ram-nix/default.nix new file mode 100644 index 0000000..8433f3f --- /dev/null +++ b/morepkgs/pkgs/system/low-ram-nix/default.nix @@ -0,0 +1,25 @@ +/* Source: https://github.com/NixOS/nix/pull/2206#issuecomment-394130511 */ + +{nixUnstable, fetchpatch, fetchFromGitHub, aws-sdk-cpp, ...}: + nixUnstable.overrideAttrs (oldAttrs: { + src = fetchFromGitHub { + owner = "NixOS"; + repo = "nix"; + rev = "54b1c596435b0aaf3a2557652ad4bf74d5756514"; + sha256 = "0g7knsfj445r50rk0d9hm5n1pv20k542bz6xf5c47qmkgvfa40x4"; + }; + patches = [ + (fetchpatch { + url = "https://github.com/nh2/nix/commit/d31a4410d92790e2c27110154896445d99d7abfe.patch"; + sha256 = "08gcw2xw8yc61zz2nr1j3cnd6wagp5qs02mjfazrd9wa045y26hg"; + }) + ]; + # Changes cherry-picked from upstream nix `release-common.nix` that + # aren't in `pkgs.nixUnstable` yet: + buildInputs = oldAttrs.buildInputs ++ [ + (aws-sdk-cpp.override { + apis = ["s3" "transfer"]; + customMemoryManagement = false; + }) + ]; + })