diff --git a/release.nix b/release.nix index f9f3afb..e32214c 100644 --- a/release.nix +++ b/release.nix @@ -1,8 +1,20 @@ let pkgs = import { }; pipes-zlib = pkgs.haskell.lib.doJailbreak pkgs.haskellPackages.pipes-zlib; - produce = path: args: pkgs.haskell.lib.dontCheck - (pkgs.haskellPackages.callCabal2nix (builtins.baseNameOf path) path args); + produce = path: args: testPatch + (pkgs.haskellPackages.callCabal2nix (builtins.baseNameOf path) path args); + gitRepo = ./.git; + testPatch = prj: pkgs.haskell.lib.overrideCabal prj (_prj: { + postPatch = '' + tmpGit="$(${pkgs.coreutils}/bin/mktemp -d)" + echo $tmpGit + cp -r ${gitRepo} $tmpGit + ls -al $tmpGit + substituteInPlace $src/test/Spec.hs --replace \ + 'repo = "../.git"' + "repo = \"$tmpGit\"" + ''; + }); in rec { duffer = produce ./duffer {};