diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63856e8..5b6cb9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,7 @@ jobs: - run: nix build '.#neovim-nightly' - run: nix build '.#q' - run: nix build '.#rimgo' + - run: nix build '.#rexit' - run: nix build '.#vuetorrent' - run: nix build '.#bdfr-browser' - run: nix build '.#website-docs-nifoc-pw' diff --git a/packages/rexit.nix b/packages/rexit.nix index 6ca1f4f..9446880 100644 --- a/packages/rexit.nix +++ b/packages/rexit.nix @@ -1,36 +1,35 @@ { pkgs, lib }: -pkgs.stdenv.mkDerivation rec { +let + inherit (pkgs.stdenv) isDarwin; +in +pkgs.rustPlatform.buildRustPackage { pname = "rexit"; version = "1.2.0"; - src = pkgs.fetchurl { - url = "https://github.com/MPult/Rexit/releases/download/v${version}/rexit-macos.zip"; - sha256 = "sha256-Xuf2bpTAIodeD4NinrFaWVNd5y/hvJjvQTYtAchBWb4="; + src = pkgs.fetchFromGitHub { + owner = "nifoc"; + repo = "Rexit"; + rev = "a2c8979a9755e609adb618c6a10d740e73adff74"; + sha256 = "sha256-6EiSwviHpmqBljTA3nqRIavpk7NbyMktUhxkpN7efq4="; }; - buildInputs = with pkgs; [ unzip ]; + cargoSha256 = "sha256-HZJZ15bPV/CW6w2T5ALVsp2ngLU/5B0Vjn5n/kSatp4="; - unpackPhase = '' - unzip $src - ''; + buildInputs = with pkgs; [ + libiconv + ] ++ lib.optionals isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ + CoreFoundation + CoreServices + Security + ]); - dontStrip = true; - - installPhase = '' - install -D rexit $out/bin/rexit - ''; - - doInstallCheck = true; - - installCheckPhase = '' - $out/bin/rexit --version - ''; + doCheck = false; meta = with lib; { description = "This tool will export your reddit chats into a plethora of formats"; homepage = "https://github.com/MPult/Rexit/"; license = [ licenses.gpl3Only ]; - platforms = [ "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "x86_64-linux" ]; }; }