2021-09-01 06:03:51 +01:00
|
|
|
{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []) }:
|
2018-11-20 00:37:44 +00:00
|
|
|
|
|
|
|
let
|
2021-09-01 06:03:51 +01:00
|
|
|
termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self);
|
2018-11-20 00:37:44 +00:00
|
|
|
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;
|
2021-09-01 06:03:51 +01:00
|
|
|
|
|
|
|
meta = haskellPackages.termonad.meta // {
|
|
|
|
mainProgram = "termonad";
|
|
|
|
};
|
2018-11-20 00:37:44 +00:00
|
|
|
}
|