Unverified Commit 3b3179c4 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #336874 from museoa/so

so:  update and adopt
parents b5958663 77debe79
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
{
  lib,
  darwin,
  fetchFromGitHub,
  libiconv,
  openssl,
  pkg-config,
  rustPlatform,
  stdenv,
  testers,
}:

let
  inherit (darwin.apple_sdk.frameworks) Security;
  self = rustPlatform.buildRustPackage {
    pname = "so";
    version = "0.4.10";

    src = fetchFromGitHub {
      pname = "so-source";
      inherit (self) version;
      owner = "samtay";
      repo = "so";
      rev = "v${self.version}";
      hash = "sha256-25jZEo1C9XF4m9YzDwtecQy468nHyv2wnRuK5oY2siU=";
    };

    cargoHash = "sha256-F9DNY0jKhH6aQRqlXq6MEMoFa1qtvAdL5lSEsql6gcI=";

    nativeBuildInputs = [ pkg-config ];

    buildInputs =
      [ openssl ]
      ++ lib.optionals stdenv.isDarwin [
        libiconv
        Security
      ];

    strictDeps = true;

    passthru = {
      tests = {
        version = testers.testVersion {
          package = self;
          command = ''
            export HOME=$TMP
            so --version
          '';
        };
      };
    };

    meta = {
      homepage = "https://github.com/samtay/so";
      description = "TUI to StackExchange network";
      changelog = "https://github.com/samtay/so/blob/main/CHANGELOG.md";
      mainProgram = "so";
      license = lib.licenses.mit;
      maintainers = with lib.maintainers; [ AndersonTorres ];
    };
  };
in
self
+0 −28
Original line number Diff line number Diff line
{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, libiconv, Security }:

rustPlatform.buildRustPackage rec {
  pname = "so";
  version = "0.4.9";

  src = fetchFromGitHub {
    owner = "samtay";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-4IZNOclQj3ZLE6WRddn99CrV8OoyfkRBXnA4oEyMxv8=";
  };

  cargoHash = "sha256-hHXA/n/HQeBaD4QZ2b6Okw66poBRwNTpQWF0qBhLp/o=";

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
    libiconv Security
  ];

  meta = with lib; {
    description = "TUI interface to the StackExchange network";
    mainProgram = "so";
    homepage = "https://github.com/samtay/so";
    license = licenses.mit;
    maintainers = with maintainers; [ mredaelli ];
  };
}
+0 −4
Original line number Diff line number Diff line
@@ -12673,10 +12673,6 @@ with pkgs;
  snort = callPackage ../applications/networking/ids/snort { };
  so = callPackage ../development/tools/so {
    inherit (darwin.apple_sdk.frameworks) Security;
  };
  soapui = callPackage ../applications/networking/soapui {
    jdk = if stdenv.isDarwin
      then (jdk11.override { enableJavaFX = true; })