Reputation: 811
I use cabal2nix to generate shell.nix files. However I can't figure out how to add non-Haskell package dependencies to a shell.nix file.
Below is a simple shell.nix file example generated by cabal2nix --shell
. How would I edit it to do what I want?
with (import <nixpkgs> {}).pkgs;
let pkg = haskellngPackages.callPackage
({ mkDerivation, base,
, cabal-install}:
mkDerivation {
pname = "testing";
version = "0.1.0.0";
src = ./.;
buildDepends = [ base cabal-install];
license = stdenv.lib.licenses.publicDomain;
}) {};
in
pkg.env
Upvotes: 1
Views: 362
Reputation: 12961
The buildDepends
attribute is not specific to cabal, it's present in all nix derivations. So you just need to add your dependencies to that array. For example, if you need ffmpeg
for some reason, just write:
buildDepends = [ base cabal-install ffmpeg ];
Upvotes: 1