2020-11-13 18:54:56 +00:00
|
|
|
{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []), nixosTests }:
|
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 {
|
2022-03-07 11:37:20 +00:00
|
|
|
pname = "termonad-with-packages";
|
|
|
|
inherit (termonadEnv) version;
|
2018-11-20 00:37:44 +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-01 06:03:51 +01:00
|
|
|
|
2020-11-13 18:54:56 +00:00
|
|
|
passthru.tests.test = nixosTests.terminal-emulators.termonad;
|
|
|
|
|
2021-09-01 06:03:51 +01:00
|
|
|
meta = haskellPackages.termonad.meta // {
|
|
|
|
mainProgram = "termonad";
|
|
|
|
};
|
2018-11-20 00:37:44 +00:00
|
|
|
}
|