Nix configuration
This commit is contained in:
parent
da54207774
commit
bab975ef06
2
default.nix
Normal file
2
default.nix
Normal file
@ -0,0 +1,2 @@
|
||||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7101" }:
|
||||
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./ldap-client.nix {}
|
||||
17
ldap-client.nix
Normal file
17
ldap-client.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ mkDerivation, asn1-encoding, asn1-types, async, base, bytestring
|
||||
, connection, containers, doctest, hspec, network, process
|
||||
, semigroups, stdenv, stm, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ldap-client";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
buildDepends = [
|
||||
asn1-encoding asn1-types async base bytestring connection
|
||||
containers network semigroups stm text
|
||||
];
|
||||
testDepends = [ base bytestring doctest hspec process semigroups ];
|
||||
homepage = "https://supki.github.io/ldap-client";
|
||||
description = "Pure Haskell LDAP Client Library";
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
}
|
||||
17
shell.nix
Normal file
17
shell.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7101" }: let
|
||||
inherit (nixpkgs) pkgs;
|
||||
ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages( ps: with ps; [
|
||||
hdevtools doctest
|
||||
]);
|
||||
cabal-install = pkgs.haskell.packages.${compiler}.cabal-install;
|
||||
pkg = (import ./default.nix { inherit nixpkgs compiler; });
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = pkg.pname;
|
||||
buildInputs = [ ghc cabal-install ] ++ pkg.env.buildInputs;
|
||||
shellHook = ''
|
||||
${pkg.env.shellHook}
|
||||
export IN_WHICH_NIX_SHELL=${name}
|
||||
cabal configure --package-db=$NIX_GHC_LIBDIR/package.conf.d
|
||||
'';
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user