Skip to content

Instantly share code, notes, and snippets.

@meditans
Created July 27, 2019 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save meditans/e4ea5c7ea711bb2d4e4e8ef6ad965039 to your computer and use it in GitHub Desktop.
Save meditans/e4ea5c7ea711bb2d4e4e8ef6ad965039 to your computer and use it in GitHub Desktop.
# This is the overlay I need to patch the versions of reflex I'm using to only
# have the jsaddle frontend. As we can see, there are two functions I use to
# fetch the haskell sources, `callHackageDirect` in the case of a package from
# hackage, and `callPackage` in case of a local checkout. Then I modify the
# cabal file using `overrideCabal`, which accepts the flag defined at:
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/generic-builder.nix
# I could also use the convenience functions defined at
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
# which internally use `overrideCabal`.
self: super: {
# Here's how to change or pin z3's version if we ever need to do that.
#
# z3 = super.z3.overrideAttrs (oa: {
# src = self.fetchFromGitHub {
# owner = "Z3Prover";
# repo = "z3";
# rev = "z3-4.8.4";
# sha256 = "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn";
# };
# });
haskellPackages = super.haskellPackages.extend (selfHS: superHS:
with self.haskell.lib;
with self.lib;
({
reflex =
overrideCabal
(self.haskellPackages.callHackageDirect
{ pkg = "reflex";
ver = "0.6.1";
sha256 = "07y6gqa3vk1b0ns1q6lzmd5q8xvxb5sxrnfnsa7khqgbm30bj8a3";
} {})
(old:
{ doCheck = false;
configureFlags = (old.configureFlags or []) ++ ["-f-use-template-haskell"];
});
reflex-dom-core =
overrideCabal
(self.haskellPackages.callPackage /home/carlo/code/haskell/forks/reflex-dom-core-0.5 {})
(old:
{ doCheck = false;
jailbreak = true;
});
reflex-dom =
overrideCabal
(self.haskellPackages.callHackageDirect
{ pkg = "reflex-dom";
ver = "0.5";
sha256 = "0sfmsyz8h5gm0m3rkyzflnb2cya9myv6zifkwx7i170l54q8j9z4";
} {})
(old:
{ doCheck = false;
jailbreak = true;
configureFlags = (old.configureFlags or []) ++ ["-fuse-warp" "-f-webkit2gtk"];
extraLibraries = (old.extraLibraries or []) ++ [selfHS.jsaddle-warp];
});
z3 =
overrideCabal
(self.haskellPackages.callPackage /home/carlo/code/haskell/forks/haskell-z3 { z3 = super.pkgs.z3; })
(old:
{ doCheck = false;
jailbreak = true;
});
jsaddle-warp = dontCheck (superHS.jsaddle-warp);
haskell-gi-overloading = self.haskellPackages.haskell-gi-overloading_0_0;
chrome-test-utils = null;
jsaddle-webkit2gtk = null;
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment