1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

goku: 0.6.0 -> 0.7.2; refactor (#353144)

This commit is contained in:
Masum Reza 2024-11-08 10:47:32 +05:30 committed by GitHub
commit e818264fe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,47 +1,49 @@
{ lib
, stdenv
, fetchurl
, unzip
, joker
{
lib,
stdenvNoCC,
fetchurl,
unzip,
joker,
nix-update-script,
}:
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "goku";
version = "0.6.0";
version = "0.7.2";
src = if stdenv.hostPlatform.isAarch64 then
fetchurl {
url = "https://github.com/yqrashawn/GokuRakuJoudo/releases/download/v${version}/goku-arm.zip";
hash = "sha256-TIoda2kDckK1FBLAmKudsDs3LXO4J0KWiAD2JlFb4rk=";
}
else fetchurl {
url = "https://github.com/yqrashawn/GokuRakuJoudo/releases/download/v${version}/goku.zip";
hash = "sha256-8HdIwtpzR6O2WCbMYIJ6PHcM27Xmb+4Tc5Fmjl0dABQ=";
};
src =
if stdenvNoCC.hostPlatform.isAarch64 then
fetchurl {
url = "https://github.com/yqrashawn/GokuRakuJoudo/releases/download/v${finalAttrs.version}/goku-arm.zip";
hash = "sha256-mjz1JD12U23Pi8kumELtT9ENhXpX8Db4LUS3DOtP5GM=";
}
else
fetchurl {
url = "https://github.com/yqrashawn/GokuRakuJoudo/releases/download/v${finalAttrs.version}/goku.zip";
hash = "sha256-8HdIwtpzR6O2WCbMYIJ6PHcM27Xmb+4Tc5Fmjl0dABQ=";
};
nativeBuildInputs = [
unzip
];
nativeBuildInputs = [ unzip ];
buildInputs = [
joker
];
buildInputs = [ joker ];
sourceRoot = if stdenv.hostPlatform.isAarch64 then "goku" else ".";
sourceRoot = if stdenvNoCC.hostPlatform.isAarch64 then "goku" else ".";
passthru.updateScript = nix-update-script { };
installPhase = ''
chmod +x goku
chmod +x gokuw
mkdir -p $out/bin
cp goku $out/bin
cp gokuw $out/bin
runHook preInstall
mkdir -p "$out/bin"
chmod +x {goku,gokuw}
cp {goku,gokuw} "$out/bin"
runHook postInstall
'';
meta = with lib; {
meta = {
description = "Karabiner configurator";
homepage = "https://github.com/yqrashawn/GokuRakuJoudo";
license = licenses.gpl3;
maintainers = [ maintainers.nikitavoloboev ];
platforms = platforms.darwin;
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.nikitavoloboev ];
platforms = lib.platforms.darwin;
};
}
})