Files
nixpkgs/pkgs/by-name/sx/sx/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.2 KiB
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
makeDesktopItem,
patsh,
coreutils,
xorg,
nixosTests,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "sx";
version = "3.0";
src = fetchFromGitHub {
owner = "earnestly";
repo = "sx";
rev = finalAttrs.version;
hash = "sha256-hKoz7Kuus8Yp7D0F05wCOQs6BvV0NkRM9uUXTntLJxQ=";
};
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ patsh ];
buildInputs = [
coreutils # needed for cross
xorg.xauth
xorg.xorgserver
];
postInstall = ''
patsh -f $out/bin/sx -s ${builtins.storeDir} --path "$HOST_PATH"
install -Dm755 -t $out/share/xsessions ${
makeDesktopItem {
name = "sx";
desktopName = "sx";
comment = "Start a xorg server";
exec = "sx";
}
}/share/applications/sx.desktop
'';
passthru = {
providedSessions = [ "sx" ];
tests = {
inherit (nixosTests) sx;
};
};
meta = {
description = "Simple alternative to both xinit and startx for starting a Xorg server";
homepage = "https://github.com/earnestly/sx";
license = lib.licenses.mit;
mainProgram = "sx";
maintainers = with lib.maintainers; [
figsoda
thiagokokada
];
platforms = lib.platforms.linux;
};
})