2022-03-30 09:31:56 +00:00
|
|
|
{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []), nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-09-18 10:52:07 +00:00
|
|
|
termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self);
|
2020-04-24 23:36:52 +00:00
|
|
|
in stdenv.mkDerivation {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "termonad-with-packages";
|
|
|
|
inherit (termonadEnv) version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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-18 10:52:07 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru.tests.test = nixosTests.terminal-emulators.termonad;
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = haskellPackages.termonad.meta // {
|
|
|
|
mainProgram = "termonad";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|