2015-09-22 09:35:21 +01:00
|
|
|
{ mkDerivation, aeson, base, bytestring, Cabal, containers
|
|
|
|
, deepseq-generics, directory, distribution-nixpkgs, filepath
|
|
|
|
, language-nix, lens, monad-par, monad-par-extras, mtl
|
|
|
|
, optparse-applicative, pretty, SHA, split, stackage-types, stdenv
|
|
|
|
, text, time, utf8-string, yaml, fetchFromGitHub
|
2015-09-02 16:29:20 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hackage2nix";
|
2015-12-17 13:35:11 +00:00
|
|
|
version = "20151217";
|
2015-09-02 16:29:20 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nixos";
|
|
|
|
repo = "cabal2nix";
|
|
|
|
rev = "v${version}";
|
2015-12-17 13:35:11 +00:00
|
|
|
sha256 = "1140ym5j1prvzyfw8q784dr0hwvfw6s4h63j3a4j67cawa2dbkr5";
|
2015-09-02 16:29:20 +01:00
|
|
|
};
|
|
|
|
postUnpack = "sourceRoot+=/${pname}";
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
|
|
|
enableSharedExecutables = false;
|
|
|
|
executableHaskellDepends = [
|
2015-09-22 09:35:21 +01:00
|
|
|
aeson base bytestring Cabal containers deepseq-generics directory
|
|
|
|
distribution-nixpkgs filepath language-nix lens monad-par
|
|
|
|
monad-par-extras mtl optparse-applicative pretty SHA split
|
|
|
|
stackage-types text time utf8-string yaml
|
2015-09-02 16:29:20 +01:00
|
|
|
];
|
|
|
|
postInstall = ''
|
|
|
|
exe=$out/bin/${pname}
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/${pname}
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/nixos/cabal2nix#readme";
|
|
|
|
description = "Convert Cabal files into Nix build instructions";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ simons ];
|
|
|
|
}
|