From c99890c101ea6cef3b2334c582ed6d8f81e66024 Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Sat, 25 Nov 2017 11:56:28 +0800 Subject: [PATCH] Add non-working release.nix --- release.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 {};