2019-12-15 04:37:46 +00:00
|
|
|
{ stdenv, fetchFromGitHub, openssl, pkgconfig, rustPlatform }:
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
let
|
2020-01-04 05:06:31 +00:00
|
|
|
inherit (builtins) readFile toFile;
|
2019-12-15 04:37:46 +00:00
|
|
|
|
|
|
|
init = toFile "init.sh" "${readFile ./init.sh}";
|
2020-01-04 05:06:31 +00:00
|
|
|
in buildRustPackage rec {
|
2019-12-15 04:37:46 +00:00
|
|
|
pname = "purs";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
srcs = fetchFromGitHub {
|
|
|
|
owner = "xcambar";
|
|
|
|
repo = "purs";
|
|
|
|
rev = "09ed252625b691841b0043699fd4ab590edabe29";
|
|
|
|
hash = "sha256-QwkbqNROksRo+QmRrgkWuoPzPb2XBwavEtlR9oqAXDQ=";
|
|
|
|
};
|
|
|
|
|
2020-01-04 05:06:31 +00:00
|
|
|
buildInputs = [ openssl pkgconfig ];
|
2019-12-15 04:37:46 +00:00
|
|
|
|
|
|
|
cargoSha256 = "sha256-vyO2JRRA7FCNVmIeN1xybQXkdgoHbhMGT2AhUJEnp0s=";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/zsh/plugins/purs
|
|
|
|
|
|
|
|
substitute ${init} $out/share/zsh/plugins/purs/purs.zsh \
|
|
|
|
--subst-var-by PURS $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Pure-inspired prompt in Rust";
|
2020-01-04 05:06:31 +00:00
|
|
|
homepage = "https://github.com/xcambar/purs";
|
2019-12-15 04:37:46 +00:00
|
|
|
maintainers = [ maintainers.nrdxp ];
|
|
|
|
license = licenses.mit;
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|