Skip to content

Instantly share code, notes, and snippets.

@ttuegel
Created June 2, 2014 19:07
Show Gist options
  • Save ttuegel/65cd276efc40ceb0aa21 to your computer and use it in GitHub Desktop.
Save ttuegel/65cd276efc40ceb0aa21 to your computer and use it in GitHub Desktop.
Use packages from config.nix in shell.nix
pkgs:
{
packageOverrides = pkgs: with pkgs; rec {
hsDevTools = hsPkgs: [
hsPkgs.cabalInstall
hsPkgs.ghcMod
];
};
}
{ pkgs ? (import <nixpkgs> {}), haskellPackages ? pkgs.haskellPackages_ghc782
, hsDevTools ? pkgs.hsDevTools }:
let inherit (haskellPackages)
cabal exceptions filepath resourcet tasty tastyHunit transformers;
in
cabal.mkDerivation (self: {
pname = "temporary-resourcet";
version = "1.2.0.3";
src = ./.;
buildDepends = [ exceptions filepath resourcet transformers ];
testDepends = [ tasty tastyHunit ];
buildTools = hsDevTools haskellPackages;
meta = {
homepage = "http://www.github.com/ttuegel/temporary-resourcet";
description = "Portable temporary files and directories with automatic deletion";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment