2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libedit, libsecret, ncurses, pkg-config, readline, Security }:
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "envchain";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.1.0";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sorah";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-QUy38kJzMbYOyT86as4/yq2ctcszSnB8a3eVWxgd4Fo=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e "s|-ltermcap|-lncurses|" Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ libsecret readline ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libedit ncurses Security ];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-30 08:33:03 +00:00
|
|
|
description = "Set environment variables with macOS keychain or D-Bus secret service";
|
|
|
|
homepage = "https://github.com/sorah/envchain";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "envchain";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
}
|