1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

Add buildLocalCabalWithArgs for providing extra arguments to callPackage

This commit is contained in:
Shea Levy 2014-04-20 22:57:03 -04:00
parent 6b634673f9
commit 5701e4e15a

View file

@ -2992,7 +2992,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
cabal2nix = callPackage ../development/tools/haskell/cabal2nix {};
# Build a cabal package given a local .cabal file
buildLocalCabal = src: name: let
buildLocalCabalWithArgs = { src, name, args ? {} }: let
cabalExpr = pkgs.stdenv.mkDerivation ({
name = "${name}.nix";
@ -3008,7 +3008,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
});
in callPackage cabalExpr { inherit src; };
in callPackage cabalExpr ({ inherit src; } // args);
buildLocalCabal = src: name: self.buildLocalCabalWithArgs { inherit src name; };
cabalDelete = callPackage ../development/tools/haskell/cabal-delete {};