2021-05-07 01:40:42 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, readline }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hilbish";
|
2021-06-18 09:05:38 +02:00
|
|
|
version = "0.5.1";
|
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-06 19:00:35 +02:00
|
|
|
sha256 = "sha256-557Je9KeBpkZxVAxcjWAhybIJJYlzhtbnIyZh0rCRUc=";
|
|
|
|
fetchSubmodules = true;
|
2021-05-07 01:40:42 +02:00
|
|
|
};
|
|
|
|
|
2021-06-13 02:15:26 +02:00
|
|
|
vendorSha256 = "sha256-8l+Kb1ADMLwv0Hf/ikok8eUcEEST07rhk8BjHxJI0lc=";
|
2021-05-07 01:40:42 +02:00
|
|
|
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
2021-10-06 19:00:35 +02:00
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# in master vars.go is called vars_linux.go
|
|
|
|
substituteInPlace vars.go \
|
|
|
|
--replace "/usr/share" "${placeholder "out"}/share/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/hilbish"
|
|
|
|
|
|
|
|
cp .hilbishrc.lua $out/share/hilbish/
|
|
|
|
cp -r libs -t $out/share/hilbish/
|
|
|
|
cp preload.lua $out/share/hilbish/
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
}
|