Merge pull request #336874 from museoa/so

so:  update and adopt
This commit is contained in:
Jörg Thalheim 2024-08-26 11:14:13 +02:00 committed by GitHub
commit 3b3179c4a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 63 additions and 32 deletions

View File

@ -0,0 +1,63 @@
{
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

View File

@ -1,28 +0,0 @@
{ 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 ];
};
}

View File

@ -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; })