nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix
(cdep)illabout 2fe1993baa
termonad: add meta.mainProgram to easily run with flakes
This also adds a top-level `termonad` alias for
`termonad-with-packages`.
2021-09-01 14:03:51 +09:00

23 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";
};
}