Last active
August 29, 2015 14:08
-
-
Save soenkehahn/b1beb4f32d54cc177f9c to your computer and use it in GitHub Desktop.
nix: use specific revision of servant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
filterHaskellSource = builtins.filterSource (path: type: | |
type != "unknown" && | |
baseNameOf path != ".git" && | |
baseNameOf path != "result" && | |
baseNameOf path != "dist"); | |
in | |
{ pkgs ? import <nixpkgs> { } | |
, src ? filterHaskellSource ./. | |
}: | |
let | |
servantSrc = filterHaskellSource <servant>; | |
servant-new-impl = pkgs.haskellPackages.buildLocalCabalWithArgs { | |
name = "servant"; | |
src = "${servantSrc}/servant/"; | |
}; | |
in | |
pkgs.haskellPackages.buildLocalCabalWithArgs { | |
inherit src; | |
name = "kraken"; | |
args = { | |
servant = servant-new-impl; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice. I was thinking of:
with
nix-shell --arg servant "import ../servant/servant {}"
.But having a default but overridable git commit would be ideal.