Skip to content

Commit

Permalink
Nix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
acowley committed Mar 10, 2016
1 parent d9e6348 commit a0027b6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ mkDerivation, base, either, exceptions, ffmpeg-full, JuicyPixels
, mtl, stdenv, transformers, vector, Rasterific, time
}:
mkDerivation {
pname = "ffmpeg-light";
version = "0.11.0";
src = builtins.filterSource (path: type:
type != "directory" || (let bn = baseNameOf path;
in bn == "src" || bn == "demo"));
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base either exceptions JuicyPixels mtl transformers vector
];
libraryPkgconfigDepends = [ ffmpeg-full ];
executableHaskellDepends = [
base JuicyPixels mtl transformers vector Rasterific time
];
homepage = "http://github.com/acowley/ffmpeg-light";
description = "Minimal bindings to the FFmpeg library";
license = stdenv.lib.licenses.bsd3;
}
38 changes: 38 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:

let

inherit (nixpkgs) pkgs;

f = { mkDerivation, base, either, exceptions, ffmpeg-full, JuicyPixels
, mtl, stdenv, transformers, vector, Rasterific, time
}:
mkDerivation {
pname = "ffmpeg-light";
version = "0.11.0";
src = builtins.filterSource (path: type:
type != "directory" || (let bn = baseNameOf path;
in bn == "src" || bn == "demo"));
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base either exceptions JuicyPixels mtl transformers vector
];
libraryPkgconfigDepends = [ ffmpeg-full ];
executableHaskellDepends = [
base JuicyPixels mtl transformers vector Rasterific time
];
homepage = "http://github.com/acowley/ffmpeg-light";
description = "Minimal bindings to the FFmpeg library";
license = stdenv.lib.licenses.bsd3;
};

haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};

drv = pkgs.myHaskellPackages.callPackage f {};

in

if pkgs.lib.inNixShell then drv.env else drv

0 comments on commit a0027b6

Please sign in to comment.