2021-05-07 01:40:42 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, readline }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hilbish";
|
2021-10-18 02:18:16 +02:00
|
|
|
version = "0.6.0";
|
2021-05-07 01:40:42 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-06-13 02:15:26 +02:00
|
|
|
owner = "Rosettea";
|
2021-05-07 01:40:42 +02:00
|
|
|
repo = "Hilbish";
|
|
|
|
rev = "v${version}";
|
2021-10-18 02:18:16 +02:00
|
|
|
sha256 = "sha256-ACHHHGT3VGnvZVi1UZb57+g/slcld5e3bh+DDhUVVpQ=";
|
2021-10-06 19:00:35 +02:00
|
|
|
fetchSubmodules = true;
|
2021-05-07 01:40:42 +02:00
|
|
|
};
|
|
|
|
|
2021-10-18 02:18:16 +02:00
|
|
|
vendorSha256 = "sha256-SVGPMFpQjVOWCfiPpEmqhp6MEO0wqeyAZVyeNmTuXl0=";
|
2021-05-07 01:40:42 +02:00
|
|
|
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
2021-10-06 19:00:35 +02:00
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-10-18 02:18:16 +02:00
|
|
|
substituteInPlace vars_linux.go \
|
2021-10-06 19:00:35 +02:00
|
|
|
--replace "/usr/share" "${placeholder "out"}/share/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/hilbish"
|
|
|
|
|
|
|
|
cp .hilbishrc.lua $out/share/hilbish/
|
2021-10-18 02:18:16 +02:00
|
|
|
cp -r docs -t $out/share/hilbish
|
2021-10-06 19:00:35 +02:00
|
|
|
cp -r libs -t $out/share/hilbish/
|
|
|
|
cp preload.lua $out/share/hilbish/
|
2021-10-18 02:18:16 +02:00
|
|
|
|
|
|
|
# segfaults and it's already been generated upstream
|
|
|
|
# we copy the docs over with the above cp command
|
|
|
|
rm $out/bin/docgen
|
2021-10-06 19:00:35 +02:00
|
|
|
'';
|
|
|
|
|
2021-05-07 01:40:42 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An interactive Unix-like shell written in Go";
|
2021-06-13 02:15:26 +02:00
|
|
|
changelog = "https://github.com/Rosettea/Hilbish/releases/tag/v${version}";
|
|
|
|
homepage = "https://github.com/Rosettea/Hilbish";
|
2021-05-07 01:40:42 +02:00
|
|
|
maintainers = with maintainers; [ fortuneteller2k ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux; # only officially supported on Linux
|
|
|
|
};
|
|
|
|
}
|