mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
2fe1993baa
This also adds a top-level `termonad` alias for `termonad-with-packages`.
24 lines
617 B
Nix
24 lines
617 B
Nix
{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []) }:
|
|
|
|
let
|
|
termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self);
|
|
in stdenv.mkDerivation {
|
|
name = "termonad-with-packages-${termonadEnv.version}";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildCommand = ''
|
|
mkdir -p $out/bin $out/share
|
|
makeWrapper ${termonadEnv}/bin/termonad $out/bin/termonad \
|
|
--set NIX_GHC "${termonadEnv}/bin/ghc"
|
|
'';
|
|
|
|
# trivial derivation
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
|
|
meta = haskellPackages.termonad.meta // {
|
|
mainProgram = "termonad";
|
|
};
|
|
}
|