2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2023-03-15 16:39:30 +00:00
|
|
|
, joker
|
2022-05-18 14:49:53 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "goku";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
src = if stdenv.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=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildInputs = [
|
|
|
|
joker
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = if stdenv.isAarch64 then "goku" else ".";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-13 14:23:35 +00:00
|
|
|
chmod +x goku
|
|
|
|
chmod +x gokuw
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp goku $out/bin
|
|
|
|
cp gokuw $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Karabiner configurator";
|
|
|
|
homepage = "https://github.com/yqrashawn/GokuRakuJoudo";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.nikitavoloboev ];
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|