3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix
2022-03-23 22:55:50 +01:00

27 lines
705 B
Nix

{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []), nixosTests }:
let
termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self);
in stdenv.mkDerivation {
pname = "termonad-with-packages";
inherit (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;
passthru.tests.test = nixosTests.terminal-emulators.termonad;
meta = haskellPackages.termonad.meta // {
mainProgram = "termonad";
};
}