nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 903 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 libedit, 6 libsecret, 7 ncurses, 8 pkg-config, 9 readline, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "envchain"; 14 version = "1.1.0"; 15 16 src = fetchFromGitHub { 17 owner = "sorah"; 18 repo = "envchain"; 19 rev = "v${version}"; 20 sha256 = "sha256-QUy38kJzMbYOyT86as4/yq2ctcszSnB8a3eVWxgd4Fo="; 21 }; 22 23 postPatch = '' 24 sed -i -e "s|-ltermcap|-lncurses|" Makefile 25 ''; 26 27 nativeBuildInputs = [ pkg-config ]; 28 29 buildInputs = [ 30 libsecret 31 readline 32 ] 33 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 34 libedit 35 ncurses 36 ]; 37 38 makeFlags = [ "DESTDIR=$(out)" ]; 39 40 meta = with lib; { 41 description = "Set environment variables with macOS keychain or D-Bus secret service"; 42 homepage = "https://github.com/sorah/envchain"; 43 license = licenses.mit; 44 platforms = platforms.unix; 45 maintainers = [ ]; 46 mainProgram = "envchain"; 47 }; 48}