From 65319e291ba6a8aa0b24dd95cc75efe5449e6b63 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 18 Jun 2024 21:20:29 +0200 Subject: [PATCH 1/3] butler: remove --- pkgs/by-name/bu/butler/package.nix | 50 ------------------------------ pkgs/by-name/it/itch/package.nix | 9 ++++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 --- 4 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 pkgs/by-name/bu/butler/package.nix diff --git a/pkgs/by-name/bu/butler/package.nix b/pkgs/by-name/bu/butler/package.nix deleted file mode 100644 index 62d215dc5af0..000000000000 --- a/pkgs/by-name/bu/butler/package.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ lib -, buildGoModule -, fetchFromGitHub -, stdenv -, Cocoa -, fetchpatch -}: - -buildGoModule rec { - pname = "butler"; - version = "15.21.0"; - - src = fetchFromGitHub { - owner = "itchio"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-vciSmXR3wI3KcnC+Uz36AgI/WUfztA05MJv1InuOjJM="; - }; - - buildInputs = lib.optionals stdenv.isDarwin [ - Cocoa - ]; - - patches = [ - # update x/sys dependency for darwin build https://github.com/itchio/butler/pull/245 - (fetchpatch { - url = "https://github.com/itchio/butler/pull/245/commits/ef651d373e3061fda9692dd44ae0f7ce215e9655.patch"; - hash = "sha256-rZZn/OGiv3mRyy89uORyJ99zWN21kZCCQAlFvSKxlPU="; - }) - ]; - - proxyVendor = true; - - vendorHash = "sha256-GvUUCQ2BPW0HlXZljBWJ2Wyys9OEIM55dEWAa6J19Zg="; - - doCheck = false; - - meta = with lib; { - # butler cannot be build with Go >=1.21 - # See https://github.com/itchio/butler/issues/256 - # and https://github.com/itchio/dmcunrar-go/issues/1 - # The dependency causing the issue is marked as 'no maintainence intended'. - # Last butler release is from 05/2021. - broken = true; - description = "Command-line itch.io helper"; - homepage = "https://github.com/itchio/butler"; - license = licenses.mit; - maintainers = with maintainers; [ martfont ]; - }; -} diff --git a/pkgs/by-name/it/itch/package.nix b/pkgs/by-name/it/itch/package.nix index 3f5337f04cf1..c0e8bb929ec9 100644 --- a/pkgs/by-name/it/itch/package.nix +++ b/pkgs/by-name/it/itch/package.nix @@ -2,7 +2,6 @@ , stdenvNoCC , fetchzip , fetchFromGitHub -, butler , electron , steam-run , makeWrapper @@ -20,6 +19,12 @@ stdenvNoCC.mkDerivation rec { hash = "sha256-FHwbzLPMzIpyg6KyYTq6/rSNRH76dytwb9D5f9vNKkU="; }; + butler = fetchzip { + url = "https://broth.itch.zone/butler/linux-amd64/15.21.0/butler.zip"; + stripRoot = false; + hash = "sha256-jHni/5qf7xST6RRonP2EW8fJ6647jobzrnHe8VMx4IA="; + }; + itch-setup = fetchzip { url = "https://broth.itch.ovh/itch-setup/linux-amd64/1.26.0/itch-setup.zip"; stripRoot = false; @@ -80,7 +85,7 @@ stdenvNoCC.mkDerivation rec { --add-flags ${electron}/bin/electron \ --add-flags $out/share/itch/resources/app \ --set BROTH_USE_LOCAL butler,itch-setup \ - --prefix PATH : ${butler}/bin/:${itch-setup} + --prefix PATH : ${butler}:${itch-setup} ''; meta = with lib; { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index fbd7bdaaad00..350524a5ad0a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -141,6 +141,7 @@ mapAliases ({ bro = throw "'bro' has been renamed to/replaced by 'zeek'"; # Converted to throw 2023-09-10 inherit (libsForQt5.mauiPackages) buho; # added 2022-05-17 bukut = throw "bukut has been removed since it has been archived by upstream"; # Added 2023-05-24 + butler = throw "butler was removed because it was broken and abandoned upstream"; # added 2024-06-18 # Shorter names; keep the longer name for back-compat. Added 2023-04-11 buildFHSUserEnv = buildFHSEnv; buildFHSUserEnvChroot = buildFHSEnvChroot; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e846c3409166..443fb27ef3c0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1703,10 +1703,6 @@ with pkgs; btc-rpc-explorer = callPackage ../tools/misc/btc-rpc-explorer { }; - butler = callPackage ../by-name/bu/butler/package.nix { - inherit (darwin.apple_sdk.frameworks) Cocoa; - }; - carbon-now-cli = callPackage ../tools/typesetting/carbon-now-cli { }; cf-vault = callPackage ../tools/admin/cf-vault { }; From 10afd368334b487ec6c96dd80425f65c80445932 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 18 Jun 2024 21:21:36 +0200 Subject: [PATCH 2/3] itch: 26.1.3 -> 26.1.9 --- pkgs/by-name/it/itch/package.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/it/itch/package.nix b/pkgs/by-name/it/itch/package.nix index c0e8bb929ec9..c1f3f2221bc6 100644 --- a/pkgs/by-name/it/itch/package.nix +++ b/pkgs/by-name/it/itch/package.nix @@ -10,13 +10,12 @@ }: stdenvNoCC.mkDerivation rec { pname = "itch"; - version = "26.1.3"; + version = "26.1.9"; - # TODO: Using kitch instead of itch, revert when possible src = fetchzip { - url = "https://broth.itch.ovh/kitch/linux-amd64/${version}/archive/default#.zip"; + url = "https://broth.itch.ovh/itch/linux-amd64/${version}/archive/default#.zip"; stripRoot = false; - hash = "sha256-FHwbzLPMzIpyg6KyYTq6/rSNRH76dytwb9D5f9vNKkU="; + hash = "sha256-4k6afBgOKGs7rzXAtIBpmuQeeT/Va8/0bZgNYjuJhgI="; }; butler = fetchzip { @@ -35,8 +34,8 @@ stdenvNoCC.mkDerivation rec { fetchFromGitHub { owner = "itchio"; repo = "itch"; - rev = "v${version}-canary"; - hash = "sha256-0AMyDZ5oI7/pSvudoEqXnMZJtpcKVlUSR6YVm+s4xv0="; + rev = "v${version}"; + hash = "sha256-jugg+hdP0y0OkFhdQuEI9neWDuNf2p3+DQuwxe09Zck="; sparseCheckout = [ sparseCheckout ]; } + sparseCheckout; @@ -59,10 +58,6 @@ stdenvNoCC.mkDerivation rec { installPhase = '' runHook preInstall - # TODO: Remove when the next stable Itch is stabilized - substituteInPlace ./resources/app/package.json \ - --replace "kitch" "itch" - mkdir -p $out/bin $out/share/itch/resources/app cp -r resources/app "$out/share/itch/resources/" From 1f767392ddab790418104603b64a38ce855c9581 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 18 Jun 2024 21:28:06 +0200 Subject: [PATCH 3/3] itch: format --- pkgs/by-name/it/itch/package.nix | 80 ++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/pkgs/by-name/it/itch/package.nix b/pkgs/by-name/it/itch/package.nix index c1f3f2221bc6..4b156fe0b710 100644 --- a/pkgs/by-name/it/itch/package.nix +++ b/pkgs/by-name/it/itch/package.nix @@ -1,23 +1,17 @@ -{ lib -, stdenvNoCC -, fetchzip -, fetchFromGitHub -, electron -, steam-run -, makeWrapper -, copyDesktopItems -, makeDesktopItem +{ + lib, + stdenvNoCC, + fetchzip, + fetchFromGitHub, + electron, + steam-run, + makeWrapper, + copyDesktopItems, + makeDesktopItem, }: -stdenvNoCC.mkDerivation rec { - pname = "itch"; + +let version = "26.1.9"; - - src = fetchzip { - url = "https://broth.itch.ovh/itch/linux-amd64/${version}/archive/default#.zip"; - stripRoot = false; - hash = "sha256-4k6afBgOKGs7rzXAtIBpmuQeeT/Va8/0bZgNYjuJhgI="; - }; - butler = fetchzip { url = "https://broth.itch.zone/butler/linux-amd64/15.21.0/butler.zip"; stripRoot = false; @@ -30,16 +24,31 @@ stdenvNoCC.mkDerivation rec { hash = "sha256-5MP6X33Jfu97o5R1n6Og64Bv4ZMxVM0A8lXeQug+bNA="; }; - icons = let sparseCheckout = "/release/images/itch-icons"; in + sparseCheckout = "/release/images/itch-icons"; + icons = fetchFromGitHub { - owner = "itchio"; - repo = "itch"; - rev = "v${version}"; - hash = "sha256-jugg+hdP0y0OkFhdQuEI9neWDuNf2p3+DQuwxe09Zck="; - sparseCheckout = [ sparseCheckout ]; - } + sparseCheckout; + owner = "itchio"; + repo = "itch"; + rev = "v${version}"; + hash = "sha256-jugg+hdP0y0OkFhdQuEI9neWDuNf2p3+DQuwxe09Zck="; + sparseCheckout = [ sparseCheckout ]; + } + + sparseCheckout; +in +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "itch"; + inherit version; - nativeBuildInputs = [ copyDesktopItems makeWrapper ]; + src = fetchzip { + url = "https://broth.itch.ovh/itch/linux-amd64/${finalAttrs.version}/archive/default#.zip"; + stripRoot = false; + hash = "sha256-4k6afBgOKGs7rzXAtIBpmuQeeT/Va8/0bZgNYjuJhgI="; + }; + + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + ]; desktopItems = [ (makeDesktopItem { @@ -48,7 +57,10 @@ stdenvNoCC.mkDerivation rec { tryExec = "itch"; icon = "itch"; desktopName = "itch"; - mimeTypes = [ "x-scheme-handler/itchio" "x-scheme-handler/itch" ]; + mimeTypes = [ + "x-scheme-handler/itchio" + "x-scheme-handler/itch" + ]; comment = "Install and play itch.io games easily"; categories = [ "Game" ]; }) @@ -64,9 +76,9 @@ stdenvNoCC.mkDerivation rec { install -Dm644 LICENSE -t "$out/share/licenses/$pkgname/" install -Dm644 LICENSES.chromium.html -t "$out/share/licenses/$pkgname/" - for icon in $icons/icon*.png + for icon in ${icons}/icon*.png do - iconsize="''${icon#$icons/icon}" + iconsize="''${icon#${icons}/icon}" iconsize="''${iconsize%.png}" icondir="$out/share/icons/hicolor/''${iconsize}x''${iconsize}/apps/" install -Dm644 "$icon" "$icondir/itch.png" @@ -83,13 +95,13 @@ stdenvNoCC.mkDerivation rec { --prefix PATH : ${butler}:${itch-setup} ''; - meta = with lib; { + meta = { description = "Best way to play itch.io games"; homepage = "https://github.com/itchio/itch"; - license = licenses.mit; - platforms = platforms.linux; + license = lib.licenses.mit; + platforms = lib.platforms.linux; sourceProvenance = [ lib.sourceTypes.binaryBytecode ]; - maintainers = with maintainers; [ pasqui23 ]; + maintainers = with lib.maintainers; [ pasqui23 ]; mainProgram = "itch"; }; -} +})