2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, libgit2
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, git
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
let
|
|
|
|
# josh-ui requires javascript dependencies, haven't tried to figure it out yet
|
|
|
|
cargoFlags = [ "--workspace" "--exclude" "josh-ui" ];
|
|
|
|
in
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "josh";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "23.12.04";
|
2023-07-15 17:15:38 +00:00
|
|
|
JOSH_VERSION = "r${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esrlabs";
|
|
|
|
repo = "josh";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = JOSH_VERSION;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "10fspcafqnv6if5c1h8z9pf9140jvvlrch88w62wsg4w2vhaii0v";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoSha256 = "1j0vl3h6f65ldg80bgryh1mz423lcrcdkn8rmajya1850pfxk3w3";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libgit2
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
darwin.Security
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoBuildFlags = cargoFlags;
|
|
|
|
cargoTestFlags = cargoFlags;
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/josh-proxy" --prefix PATH : "${git}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Just One Single History";
|
|
|
|
homepage = "https://josh-project.github.io/josh/";
|
|
|
|
downloadPage = "https://github.com/josh-project/josh";
|
|
|
|
changelog = "https://github.com/josh-project/josh/releases/tag/${version}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [
|
|
|
|
lib.maintainers.sternenseemann
|
|
|
|
lib.maintainers.tazjin
|
|
|
|
];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|