-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjekyll-sassc-patch.nix
More file actions
30 lines (29 loc) · 897 Bytes
/
jekyll-sassc-patch.nix
File metadata and controls
30 lines (29 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
self: super:
let
# See https://github.com/NixOS/nixpkgs/issues/19098
# and https://github.com/sass/sassc-ruby/pull/166
patch = builtins.toFile "lto.patch" ''
diff --git a/ext/extconf.rb b/ext/extconf.rb
index 08e067c..754988d 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -25,7 +25,7 @@ if enable_config('march-tune-native', true)
$CXXFLAGS << ' -march=native -mtune=native'
end
-if enable_config('lto', true)
+if enable_config('lto', false)
$CFLAGS << ' -flto'
$CXXFLAGS << ' -flto'
$LDFLAGS << ' -flto'
'';
in {
jekyll = super.jekyll.override (old: {
bundlerApp = attrs: old.bundlerApp (attrs // {
gemset = let
gems = import (attrs.gemdir + "/gemset.nix");
in super.lib.recursiveUpdate gems {
sassc.patches = super.lib.optional self.stdenv.isDarwin [ patch ];
};
});
});
}