Skip to content

Commit

Permalink
Add non-working release.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavsagar committed Nov 25, 2017
1 parent 7f4a6aa commit c99890c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions release.nix
@@ -1,8 +1,20 @@
let
pkgs = import <nixpkgs> { };
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 {};
Expand Down

0 comments on commit c99890c

Please sign in to comment.