guile-ssh: clean up the package (#256541)

* guile-ssh: add foo-dogsquared as maintainer

* guile-ssh: reformat buildInputs

* guile-ssh: add patch for installing module

It makes for an easier time configuring the module installation.

* guile-ssh: remove extension patches

nixpkgs have properly initialized search paths for Guile extensions now
(at least for Guile 3.0.6 and above) so no need to patch the scheme.

* guile-ssh: enable checks

---------

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
This commit is contained in:
Gabriel Arazas 2023-09-21 20:52:02 +00:00 committed by GitHub
parent f88d082097
commit 22c5e1a0a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, guile , guile
, libssh , libssh
, autoreconfHook , autoreconfHook
@ -9,43 +10,57 @@
, which , which
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "guile-ssh"; pname = "guile-ssh";
version = "0.16.3"; version = "0.16.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "artyom-poptsov"; owner = "artyom-poptsov";
repo = pname; repo = "guile-ssh";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-P29U88QrCjoyl/wdTPZbiMoykd/v6ul6CW/IJn9UAyw="; hash = "sha256-P29U88QrCjoyl/wdTPZbiMoykd/v6ul6CW/IJn9UAyw=";
}; };
configureFlags = [ "--with-guilesitedir=\${out}/${guile.siteDir}" ]; patches = [
(fetchpatch {
url = "https://github.com/artyom-poptsov/guile-ssh/pull/31/commits/38636c978f257d5228cd065837becabf5da16854.patch";
hash = "sha256-J+TDgdjihKoEjhbeH+BzqrHhjpVlGdscRj3L/GAFgKg=";
})
];
postFixup = '' strictDeps = true;
for f in $out/${guile.siteDir}/ssh/**.scm; do \
substituteInPlace $f \
--replace "libguile-ssh" "$out/lib/libguile-ssh"; \
done
'';
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook pkg-config texinfo which autoreconfHook
guile
pkg-config
texinfo
which
]; ];
buildInputs = [ buildInputs = [
guile guile
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
libssh libssh
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;
# FAIL: server-client.scm
doCheck = !stdenv.isDarwin;
postInstall = ''
mv $out/bin/*.scm $out/share/guile-ssh
rmdir $out/bin
'';
meta = with lib; { meta = with lib; {
description = "Bindings to Libssh for GNU Guile"; description = "Bindings to Libssh for GNU Guile";
homepage = "https://github.com/artyom-poptsov/guile-ssh"; homepage = "https://github.com/artyom-poptsov/guile-ssh";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ ethancedwards8 ]; maintainers = with maintainers; [ ethancedwards8 foo-dogsquared ];
platforms = guile.meta.platforms; platforms = guile.meta.platforms;
}; };
} })