diff --git a/pkgs/tools/X11/sx/default.nix b/pkgs/tools/X11/sx/default.nix index faddc7486809..f48e59c753eb 100644 --- a/pkgs/tools/X11/sx/default.nix +++ b/pkgs/tools/X11/sx/default.nix @@ -1,12 +1,11 @@ { lib -, bash -, coreutils +, stdenvNoCC , fetchFromGitHub -, resholve +, patsh , xorg }: -resholve.mkDerivation rec { +stdenvNoCC.mkDerivation rec { pname = "sx"; version = "2.1.7"; @@ -19,20 +18,16 @@ resholve.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - solutions = { - sx = { - scripts = [ "bin/sx" ]; - interpreter = "${bash}/bin/sh"; - inputs = [ - coreutils - xorg.xauth - xorg.xorgserver - ]; - execer = [ - "cannot:${xorg.xorgserver}/bin/Xorg" - ]; - }; - }; + nativeBuildInputs = [ patsh ]; + + buildInputs = [ + xorg.xauth + xorg.xorgserver + ]; + + postInstall = '' + patsh -f $out/bin/sx -s ${builtins.storeDir} + ''; meta = with lib; { description = "Simple alternative to both xinit and startx for starting a Xorg server";