nixpkgs/pkgs/applications/window-managers/xmonad/xmonadctl.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

26 lines
730 B
Nix

{ stdenv, lib, fetchFromGitHub, ghcWithPackages, haskellPackages, ... }:
let xmonadctlEnv = ghcWithPackages (self: [ self.xmonad-contrib self.X11 ]);
in stdenv.mkDerivation rec {
pname = "xmonadctl";
inherit (haskellPackages.xmonad-contrib) src version;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
${xmonadctlEnv}/bin/ghc -o $out/bin/xmonadctl \
--make scripts/xmonadctl.hs
runHook postInstall
'';
meta = with lib; {
platforms = platforms.unix;
description = "Send commands to a running instance of xmonad";
mainProgram = "xmonadctl";
homepage = "https://github.com/xmonad/xmonad-contrib";
license = licenses.bsd3;
maintainers = [ maintainers.ajgrf ];
};
}