From 8bc206b37103e21574369850b1257aea48a5c7e9 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:13:35 +0530 Subject: abuse: move to finalAttrs explicitly use lib where needed --- pkgs/games/abuse/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pkgs/games') diff --git a/pkgs/games/abuse/default.nix b/pkgs/games/abuse/default.nix index 0a77c842bd82b..cd3587a244e0b 100644 --- a/pkgs/games/abuse/default.nix +++ b/pkgs/games/abuse/default.nix @@ -4,14 +4,14 @@ , SDL2, SDL2_mixer, freepats }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "abuse"; version = "0.9.1"; src = fetchFromGitHub { owner = "Xenoveritas"; - repo = pname; - rev = "v${version}"; + repo = "abuse"; + rev = "v${finalAttrs.version}"; hash = "sha256-eneu0HxEoM//Ju2XMHnDMZ/igeVMPSLg7IaxR2cnJrk="; }; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }; preConfigure = '' - cp --reflink=auto -r ${data}/data/sfx ${data}/data/music data/ + cp --reflink=auto -r ${finalAttrs.data}/data/sfx ${finalAttrs.data}/data/music data/ ''; desktopItems = [ (makeDesktopItem { @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { substituteAll "${./abuse.sh}" $out/bin/abuse chmod +x $out/bin/abuse - install -Dm644 ${data}/doc/abuse.png $out/share/pixmaps/abuse.png + install -Dm644 ${finalAttrs.data}/doc/abuse.png $out/share/pixmaps/abuse.png ''; env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2"; @@ -49,16 +49,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ copyDesktopItems cmake ]; buildInputs = [ SDL2 SDL2_mixer freepats ]; - meta = with lib; { + meta = { description = "Side-scroller action game that pits you against ruthless alien killers"; homepage = "http://abuse.zoy.org/"; - license = with licenses; [ unfree ]; + license = lib.licenses.unfree; # Most of abuse is free (public domain, GPL2+, WTFPL), however the creator # of its sfx and music only gave Debian permission to redistribute the # files. Our friends from Debian thought about it some more: # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648272 - maintainers = with maintainers; [ iblech ]; - platforms = platforms.unix; + maintainers = with lib.maintainers; [ iblech ]; + platforms = lib.platforms.unix; broken = stdenv.isDarwin; }; -} +}) -- cgit 1.4.1 From cfe7930b9465ed85df67f60c33a3a7fd6cd7a0fc Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:51:17 +0530 Subject: steamPackages.steam-runtime: move to finalAttrs explicitly use lib where needed --- pkgs/games/steam/runtime.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkgs/games') diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index 8e0492b69af8f..563a09d369073 100644 --- a/pkgs/games/steam/runtime.nix +++ b/pkgs/games/steam/runtime.nix @@ -4,16 +4,16 @@ , writeShellScript, curl, nix-update }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "steam-runtime"; # from https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt version = "0.20231127.68515"; src = fetchurl { - url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz"; - sha256 = "sha256-invUOdJGNhrswsj9Vj/bSAkEigWtBQ554sBAyvPf0mk="; - name = "scout-runtime-${version}.tar.gz"; + url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${finalAttrs.version}/steam-runtime.tar.xz"; + hash = "sha256-invUOdJGNhrswsj9Vj/bSAkEigWtBQ554sBAyvPf0mk="; + name = "scout-runtime-${finalAttrs.version}.tar.gz"; }; buildCommand = '' @@ -28,10 +28,10 @@ stdenv.mkDerivation rec { ''; }; - meta = with lib; { + meta = { description = "The official runtime used by Steam"; homepage = "https://github.com/ValveSoftware/steam-runtime"; - license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit - maintainers = with maintainers; [ hrdinka abbradar ]; + license = lib.licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit + maintainers = with lib.maintainers; [ hrdinka abbradar ]; }; -} +}) -- cgit 1.4.1