2019-12-15 05:37:46 +01:00
|
|
|
{ stdenv, fetchFromGitHub, openssl, pkgconfig, rustPlatform }:
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
let
|
2020-01-04 06:06:31 +01:00
|
|
|
inherit (builtins) readFile toFile;
|
2019-12-15 05:37:46 +01:00
|
|
|
|
|
|
|
init = toFile "init.sh" "${readFile ./init.sh}";
|
2020-07-31 06:17:28 +02:00
|
|
|
in
|
|
|
|
buildRustPackage {
|
2019-12-15 05:37:46 +01:00
|
|
|
pname = "purs";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
srcs = fetchFromGitHub {
|
2020-07-17 02:43:28 +02:00
|
|
|
owner = "TimB87";
|
2019-12-15 05:37:46 +01:00
|
|
|
repo = "purs";
|
2020-07-17 02:43:28 +02:00
|
|
|
rev = "ee40ff5edf79a1aee7f87b97ca32744944778769";
|
|
|
|
hash = "sha256-ETU7dDGVa2ggM+qoFgi8k4MJNuqb3kNCX9ZbEA4r5PM=";
|
2019-12-15 05:37:46 +01:00
|
|
|
};
|
|
|
|
|
2020-01-04 06:06:31 +01:00
|
|
|
buildInputs = [ openssl pkgconfig ];
|
2019-12-15 05:37:46 +01:00
|
|
|
|
2020-07-17 02:43:28 +02:00
|
|
|
cargoSha256 = "sha256-xdDSh4CvUHA8SWBZn21UnNRXZ/SU7RdfNcJjqyE9OXA=";
|
2019-12-15 05:37:46 +01:00
|
|
|
|
|
|
|
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 06:06:31 +01:00
|
|
|
homepage = "https://github.com/xcambar/purs";
|
2019-12-15 05:37:46 +01:00
|
|
|
maintainers = [ maintainers.nrdxp ];
|
|
|
|
license = licenses.mit;
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|