on master help sign in
Tweak makeWrapper overriding

There is some upstream bug with `overrideAttrs` followed by `override`. Yuck.

commitfa559b4d50039aa89b4342a2f2c52109341e0183 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 19 Oct 2018, 15:26 (8 years ago) parentd0bec96
2 files changed+10−8
default.nix+5−3 release.nix+5−5
default.nix+5−3
@@ -91,9 +91,11 @@ let
9191 in {
9292 # Dynamic linking with split objects dramatically increases startup time (about
9393 # 0.5 seconds on a decent machine with SSD), so we do `justStaticExecutables`.
94− obelisk-command = (addOptparseApplicativeCompletionScripts "ob"
95− (haskellLib.justStaticExecutables super.obelisk-command)).overrideAttrs (drv: {
96− buildInputs = drv.buildInputs ++ [ pkgs.makeWrapper ];
94+ obelisk-command = haskellLib.overrideCabal
95+ (addOptparseApplicativeCompletionScripts "ob"
96+ (haskellLib.justStaticExecutables super.obelisk-command))
97+ (drv: {
98+ buildTools = (drv.buildTools or []) ++ [ pkgs.buildPackages.makeWrapper ];
9799 postFixup = ''
98100 ${drv.postFixup or ""}
99101 # Make `ob` reference its runtime dependencies.
release.nix+5−5
@@ -6,13 +6,13 @@ let
66
77 cacheBuildSystems = [ "x86_64-linux" "x86_64-darwin" ];
88
9− obeliskPackagesFrontendOnly = [
9+ obeliskPackagesCommon = [
1010 "obelisk-frontend"
1111 "obelisk-route"
1212 "obelisk-executable-config"
1313 ];
1414
15− obeliskPackages = obeliskPackagesFrontendOnly ++ [
15+ obeliskPackagesBackend = obeliskPackagesCommon ++ [
1616 "obelisk-asset-manifest"
1717 "obelisk-asset-serve-snap"
1818 "obelisk-backend"
@@ -49,10 +49,10 @@ let
4949 reflex-platform = obelisk.reflex-platform;
5050 ghc = pnameToAttrs
5151 obelisk.haskellPackageSets.ghc
52− obeliskPackages;
52+ obeliskPackagesBackend;
5353 ghcjs = pnameToAttrs
5454 obelisk.haskellPackageSets.ghcjs
55− obeliskPackagesFrontendOnly;
55+ obeliskPackagesCommon;
5656 cachePackages = builtins.concatLists [
5757 (builtins.attrValues ghc)
5858 (builtins.attrValues ghcjs)
@@ -74,7 +74,7 @@ let
7474 });
7575
7676 metaCache = local-self.pinBuildInputs
77− "reflex-platform-everywhere"
77+ "obelisk-everywhere"
7878 (map (a: a.cache) (builtins.attrValues perPlatform))
7979 [];
8080