From 74c55dbb254680170610c931fb839966d7c0bad2 Mon Sep 17 00:00:00 2001 From: Atemu Date: Fri, 15 Mar 2024 00:22:28 +0100 Subject: [PATCH] proton-ge-bin: make $out provide an error when added to an env This package should never be added to systemPackages or other global environments as it will not provide any function there. Making its $out a file will prevent buildEnv from including it; providing an error like this: error: The store path /nix/store/wxl3m27dmjjsfqvzzxw7ibr0gr54wwkp-proton-ge-bin-GE-Proton9-1 is a file and can't be merged into an environment using pkgs.buildEnv! at /nix/store/ndhb3bsaf3zc6gx22vjl0w11sxvapf7b-builder.pl line 122. Some breadcrumbs are left inside the file. --- pkgs/by-name/pr/proton-ge-bin/package.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pr/proton-ge-bin/package.nix b/pkgs/by-name/pr/proton-ge-bin/package.nix index 92c841349a4a..68e147ca4f9c 100644 --- a/pkgs/by-name/pr/proton-ge-bin/package.nix +++ b/pkgs/by-name/pr/proton-ge-bin/package.nix @@ -17,8 +17,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { buildCommand = '' runHook preBuild - # Intentionally empty - mkdir -p $out + # Make it impossible to add to an environment. You should use the appropriate NixOS option. + # Also leave some breadcrumbs in the file. + echo "${finalAttrs.pname} should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out ln -s $src $steamcompattool @@ -42,7 +43,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { ''; meta = { - description = "Compatibility tool for Steam Play based on Wine and additional components"; + description = '' + Compatibility tool for Steam Play based on Wine and additional components. + + (This is intended for use in the `programs.steam.extraCompatPackages` option only.) + ''; homepage = "https://github.com/GloriousEggroll/proton-ge-custom"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ NotAShelf shawn8901 ];