diff --git a/pkgs/tools/misc/keychain/default.nix b/pkgs/tools/misc/keychain/default.nix index 2eb63f09216f..1ed6be071a59 100644 --- a/pkgs/tools/misc/keychain/default.nix +++ b/pkgs/tools/misc/keychain/default.nix @@ -1,21 +1,26 @@ -{ stdenv, fetchurl, makeWrapper, coreutils, openssh, gnupg +{ stdenv, fetchFromGitHub, makeWrapper, coreutils, openssh, gnupg , procps, gnugrep, gawk, findutils, gnused }: -stdenv.mkDerivation { - name = "keychain-2.7.1"; +stdenv.mkDerivation rec { + name = "keychain-${version}"; + version = "2.8.0"; - src = fetchurl { - url = mirror://gentoo/distfiles/keychain-2.7.1.tar.bz2; - sha256 = "14ai6wjwnj09xnl81ar2dlr5kwb8y1k5ck6nc549shpng0zzw1qi"; + src = fetchFromGitHub { + owner = "funtoo"; + repo = "keychain"; + rev = "1c8eaba53a7788d12d086b66ac3929810510f73a"; + sha256 = "0ajas58cv8mp5wb6hn1zhsqiwfxvx69p4f91a5j2as299rxgrxlp"; }; - phases = [ "unpackPhase" "buildPhase" ]; + phases = [ "unpackPhase" "patchPhase" "buildPhase" ]; buildInputs = [ makeWrapper ]; + patchPhase = "sed -i -e 's,version=.*,version=\"${version}\",g' keychain.sh"; + buildPhase = '' mkdir -p $out/bin - cp keychain $out/bin + cp keychain.sh $out/bin/keychain wrapProgram $out/bin/keychain \ --prefix PATH ":" "${coreutils}/bin" \ --prefix PATH ":" "${openssh}/bin" \ @@ -27,9 +32,9 @@ stdenv.mkDerivation { --prefix PATH ":" "${procps}/bin" ''; - meta = { + meta = { description = "Keychain management tool"; - homepage = "http://www.gentoo.org/proj/en/keychain/"; + homepage = "http://www.funtoo.org/Keychain"; license = stdenv.lib.licenses.gpl2; }; }