From a81317364cc58b27437d6e0d44e067691633ed03 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Thu, 29 Aug 2019 10:11:11 +0200 Subject: [PATCH 1/8] zsh-history: init at unstable-2019-08-29 --- pkgs/shells/zsh/zsh-history/default.nix | 42 +++++ pkgs/shells/zsh/zsh-history/deps.nix | 237 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 281 insertions(+) create mode 100644 pkgs/shells/zsh/zsh-history/default.nix create mode 100644 pkgs/shells/zsh/zsh-history/deps.nix diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix new file mode 100644 index 000000000000..d9191f3e9476 --- /dev/null +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -0,0 +1,42 @@ +{ stdenv, lib, fetchFromGitHub, buildGoPackage }: + +with lib; + +buildGoPackage rec { + pname = "zsh-history"; + version = "2019-08-29"; + + src = fetchFromGitHub { + owner = "b4b4r07"; + repo = "history"; + rev = "108698699b5fa03faec1bba1bdf7b8d1204535e6"; + sha256 = "0c11m7nkxc904zl3qf07h2an1dis6iizrvyfnhp1nslnmjrkida4"; + }; + + goDeps = ./deps.nix; + goPackagePath = "history"; + + preConfigure = '' + # Extract the source + mkdir -p "$NIX_BUILD_TOP/go/src/github.com/b4b4r07" + cp -a $NIX_BUILD_TOP/source "$NIX_BUILD_TOP/go/src/github.com/b4b4r07/history" + export GOPATH=$NIX_BUILD_TOP/go/src/github.com/b4b4r07/history:$GOPATH + ''; + + installPhase = '' + install -d "$bin/bin" + install -m 0755 $NIX_BUILD_TOP/go/bin/history "$bin/bin" + install -d $out/share + cp -r $NIX_BUILD_TOP/go/src/history/misc/* $out/share + cp -r $out/share/zsh/completions $out/share/zsh/site-functions + ''; + + meta = { + description = "A CLI to provide enhanced history for your shell"; + license = licenses.mit; + homepage = https://github.com/b4b4r07/history; + platforms = platforms.unix; + maintainers = with maintainers; [ kampka ]; + outputsToInstall = [ "out" "bin" ]; + }; +} diff --git a/pkgs/shells/zsh/zsh-history/deps.nix b/pkgs/shells/zsh/zsh-history/deps.nix new file mode 100644 index 000000000000..eeefe17b4b8c --- /dev/null +++ b/pkgs/shells/zsh/zsh-history/deps.nix @@ -0,0 +1,237 @@ +# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) +[ + { + goPackagePath = "github.com/BurntSushi/toml"; + fetch = { + type = "git"; + url = "https://github.com/BurntSushi/toml"; + rev = "a368813c5e648fee92e5f6c30e3944ff9d5e8895"; + sha256 = "1sjxs2lwc8jpln80s4rlzp7nprbcljhy5mz4rf9995gq93wqnym5"; + }; + } + { + goPackagePath = "github.com/Songmu/go-ltsv"; + fetch = { + type = "git"; + url = "https://github.com/Songmu/go-ltsv"; + rev = "fa2196a290e61d8689cd018048cbb6f14802782b"; + sha256 = "1mzkvw3510vska7qmcgxxz8qlkn9avw1apfxdncs9rqs9srgqm29"; + }; + } + { + goPackagePath = "github.com/b4b4r07/go-ask"; + fetch = { + type = "git"; + url = "https://github.com/b4b4r07/go-ask"; + rev = "d8472e72c0d0ac9e17d5d63080e6bf81687030a2"; + sha256 = "0762bybn7ii6aykycssdk1rkr2zmg8ijnkz94p330rfr27cnxyrx"; + }; + } + { + goPackagePath = "github.com/b4b4r07/go-colon"; + fetch = { + type = "git"; + url = "https://github.com/b4b4r07/go-colon"; + rev = "bc5ae99f1c2b6d202bd43ea8258596f0a09e7378"; + sha256 = "046xwvddj023j3xaq6g05xgzj9n13lmhbs5vddh68nyxnhbyrxqm"; + }; + } + { + goPackagePath = "github.com/b4b4r07/go-pathshorten"; + fetch = { + type = "git"; + url = "https://github.com/b4b4r07/go-pathshorten"; + rev = "b07af83744ea6f0a3abdd663f3f0c5e4457828ab"; + sha256 = "1ccljskb7x02lzy0sai9pyscdpkj4fj1bw82bjb3xicvhiafpvkh"; + }; + } + { + goPackagePath = "github.com/briandowns/spinner"; + fetch = { + type = "git"; + url = "https://github.com/briandowns/spinner"; + rev = "5b875a9171af19dbde37e70a8fcbe2ebd7285e05"; + sha256 = "0vq78qmg07dm9vnjqz17ca9qml8np7f9vj9igsira7a39xg09ivg"; + }; + } + { + goPackagePath = "github.com/dustin/go-humanize"; + fetch = { + type = "git"; + url = "https://github.com/dustin/go-humanize"; + rev = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e"; + sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3"; + }; + } + { + goPackagePath = "github.com/fatih/color"; + fetch = { + type = "git"; + url = "https://github.com/fatih/color"; + rev = "2d684516a8861da43017284349b7e303e809ac21"; + sha256 = "1fcfmz4wji3gqmmsdx493r7d101s58hwjalqps6hy25nva5pvmfs"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "89a0c16f4dc2a70c0ed864d8ef64878f24fdaa51"; + sha256 = "0ik05qacl2alb673c7h6pn280j43y4wnv7j3lakp334zdp89npiy"; + }; + } + { + goPackagePath = "github.com/google/go-github"; + fetch = { + type = "git"; + url = "https://github.com/google/go-github"; + rev = "dae5b8767170392dd51fafc89da6605faa51a1c2"; + sha256 = "0hd1xpw12a1c406mya3c11i7zzwhx3w0wzkg7v9py437yf72m5id"; + }; + } + { + goPackagePath = "github.com/google/go-querystring"; + fetch = { + type = "git"; + url = "https://github.com/google/go-querystring"; + rev = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"; + sha256 = "0lkbm067nhmxk66pyjx59d77dbjjzwyi43gdvzyx2f8m1942rq7f"; + }; + } + { + goPackagePath = "github.com/inconshreveable/mousetrap"; + fetch = { + type = "git"; + url = "https://github.com/inconshreveable/mousetrap"; + rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"; + sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152"; + }; + } + { + goPackagePath = "github.com/kballard/go-shellquote"; + fetch = { + type = "git"; + url = "https://github.com/kballard/go-shellquote"; + rev = "95032a82bc518f77982ea72343cc1ade730072f0"; + sha256 = "1rspvmnsikdq95jmx3dykxd4k1rmgl98ryjrysvl0cf18hl1vq80"; + }; + } + { + goPackagePath = "github.com/mattn/go-colorable"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-colorable"; + rev = "efa589957cd060542a26d2dd7832fd6a6c6c3ade"; + sha256 = "0kshi4hvm0ayrsxqxy0599iv81kryhd2fn9lwjyczpj593cq069r"; + }; + } + { + goPackagePath = "github.com/mattn/go-isatty"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-isatty"; + rev = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"; + sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; + }; + } + { + goPackagePath = "github.com/mattn/go-pipeline"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-pipeline"; + rev = "cfb87a531e2beb376fe3ce94a6dfef7956d33bc7"; + sha256 = "1jkchwvcy6df8r9820ram8agw6qsvhv64a2k45lv5nldh6rz3vn0"; + }; + } + { + goPackagePath = "github.com/mattn/go-shellwords"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-shellwords"; + rev = "f8471b0a71ded0ab910825ee2cf230f25de000f1"; + sha256 = "023mdii306ff1h0n4cyylchsb5r2sdxl8x4a7dlbvry45daz2azb"; + }; + } + { + goPackagePath = "github.com/pelletier/go-buffruneio"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-buffruneio"; + rev = "e2f66f8164ca709d4c21e815860afd2024e9b894"; + sha256 = "16h7fybbai45p5gn2la6z37a8h1ws6r3pg3nwqiw6gbbgjqicrbv"; + }; + } + { + goPackagePath = "github.com/pelletier/go-toml"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-toml"; + rev = "c2dbbc24a97911339e01bda0b8cabdbd8f13b602"; + sha256 = "0v1dsqnk5zmn6ir8jgxijx14s47jvijlqfz3aq435snfrgybd5rz"; + }; + } + { + goPackagePath = "github.com/spf13/cobra"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cobra"; + rev = "7c4570c3ebeb8129a1f7456d0908a8b676b6f9f1"; + sha256 = "16amh0prlzqrrbg5j629sg0f688nfzfgn9sair8jyybqampr3wc7"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "9a97c102cda95a86cec2345a6f09f55a939babf5"; + sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "de0752318171da717af4ce24d0a2e8626afaeb11"; + sha256 = "1ps1dl2a5lwr3vbwcy8n4i1v73m567y024sk961fk281phrzp13i"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "c39426892332e1bb5ec0a434a079bf82f5d30c54"; + sha256 = "1w26avkg623xilnwnad0cq6768cfbs4mxk875382xh0da6ai50s3"; + }; + } + { + goPackagePath = "golang.org/x/oauth2"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/oauth2"; + rev = "3d292e4d0cdc3a0113e6d207bb137145ef1de42f"; + sha256 = "0jvivlvx7snacd6abd1prqxa7h1z6b7s6mqahn8lpqlag3asryrl"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "98c5dad5d1a0e8a73845ecc8897d0bd56586511d"; + sha256 = "1jqajmnsp5a185a5gzfacnvdf5yid0ywi0bsia473h268z2rv8hs"; + }; + } + { + goPackagePath = "google.golang.org/appengine"; + fetch = { + type = "git"; + url = "https://github.com/golang/appengine"; + rev = "4216e58b9158e5f1c906f1aca75162a46a2ec88a"; + sha256 = "0mjg37cb6x3d85yi88sy20xa9czmzrfymfjg46b6ba6gr3rnlxi2"; + }; + } +] \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a078c813f7c0..788ccc6d7a01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7233,6 +7233,8 @@ in zsh-git-prompt = callPackage ../shells/zsh/zsh-git-prompt { }; + zsh-history = callPackage ../shells/zsh/zsh-history { }; + zsh-history-substring-search = callPackage ../shells/zsh/zsh-history-substring-search { }; zsh-navigation-tools = callPackage ../tools/misc/zsh-navigation-tools { }; From 887c1741dc5dbc26f2e25d45552a6b37dea8ada5 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Fri, 27 Sep 2019 10:51:10 +0200 Subject: [PATCH 2/8] zsh-history: unsable 2019-08-29 -> 2019-09-27 --- pkgs/shells/zsh/zsh-history/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index d9191f3e9476..09d610933549 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -4,13 +4,13 @@ with lib; buildGoPackage rec { pname = "zsh-history"; - version = "2019-08-29"; + version = "2019-10-27"; src = fetchFromGitHub { owner = "b4b4r07"; repo = "history"; - rev = "108698699b5fa03faec1bba1bdf7b8d1204535e6"; - sha256 = "0c11m7nkxc904zl3qf07h2an1dis6iizrvyfnhp1nslnmjrkida4"; + rev = "527e6f51873992fbf9c1aad70aa3009a0027a8de"; + sha256 = "12dc380zfg3b9k7rcsyzi9dxqh28c4957b3fsx1nxvqvdm3ralm2"; }; goDeps = ./deps.nix; From ab42e3936776a2aab8a022ecb4dff0d16c3fbc5c Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Fri, 27 Sep 2019 13:50:47 +0200 Subject: [PATCH 3/8] zsh-history: package build improvements --- pkgs/shells/zsh/zsh-history/default.nix | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 09d610933549..dd04219772a6 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -14,20 +14,11 @@ buildGoPackage rec { }; goDeps = ./deps.nix; - goPackagePath = "history"; + goPackagePath = "github.com/b4b4r07/history"; - preConfigure = '' - # Extract the source - mkdir -p "$NIX_BUILD_TOP/go/src/github.com/b4b4r07" - cp -a $NIX_BUILD_TOP/source "$NIX_BUILD_TOP/go/src/github.com/b4b4r07/history" - export GOPATH=$NIX_BUILD_TOP/go/src/github.com/b4b4r07/history:$GOPATH - ''; - - installPhase = '' - install -d "$bin/bin" - install -m 0755 $NIX_BUILD_TOP/go/bin/history "$bin/bin" + postInstall = '' install -d $out/share - cp -r $NIX_BUILD_TOP/go/src/history/misc/* $out/share + cp -r $NIX_BUILD_TOP/go/src/${goPackagePath}/misc/* $out/share cp -r $out/share/zsh/completions $out/share/zsh/site-functions ''; @@ -37,6 +28,5 @@ buildGoPackage rec { homepage = https://github.com/b4b4r07/history; platforms = platforms.unix; maintainers = with maintainers; [ kampka ]; - outputsToInstall = [ "out" "bin" ]; }; } From 165b47bfe48bc2a51dfaf0056aaab7f3f400d0f2 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Sat, 28 Sep 2019 12:32:22 +0200 Subject: [PATCH 4/8] zsh-history: Refactor use of `with lib` --- pkgs/shells/zsh/zsh-history/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index dd04219772a6..7da69ce89ba3 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -1,6 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, buildGoPackage }: - -with lib; +{ lib, fetchFromGitHub, buildGoPackage }: buildGoPackage rec { pname = "zsh-history"; @@ -22,7 +20,7 @@ buildGoPackage rec { cp -r $out/share/zsh/completions $out/share/zsh/site-functions ''; - meta = { + meta = with lib; { description = "A CLI to provide enhanced history for your shell"; license = licenses.mit; homepage = https://github.com/b4b4r07/history; From 0f132d0f2703e3d07e6ad63896ae40a7683b3b2f Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Sat, 28 Sep 2019 12:50:30 +0200 Subject: [PATCH 5/8] zsh-history: make use of `installShellCompletions` helper --- pkgs/shells/zsh/zsh-history/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 7da69ce89ba3..54a39209ca9c 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoPackage }: +{ lib, fetchFromGitHub, buildGoPackage, installShellFiles }: buildGoPackage rec { pname = "zsh-history"; @@ -11,13 +11,15 @@ buildGoPackage rec { sha256 = "12dc380zfg3b9k7rcsyzi9dxqh28c4957b3fsx1nxvqvdm3ralm2"; }; + nativeBuildInputs = [ installShellFiles ]; + goDeps = ./deps.nix; goPackagePath = "github.com/b4b4r07/history"; postInstall = '' install -d $out/share cp -r $NIX_BUILD_TOP/go/src/${goPackagePath}/misc/* $out/share - cp -r $out/share/zsh/completions $out/share/zsh/site-functions + installShellCompletion --zsh --name _history $out/share/zsh/completions/_history ''; meta = with lib; { From c0570ed238d73db1f59f7b764688acb532ac8c9e Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Mon, 7 Oct 2019 10:00:04 +0200 Subject: [PATCH 6/8] zsh-history: use goModule build infrastructure --- pkgs/shells/zsh/zsh-history/default.nix | 14 +- pkgs/shells/zsh/zsh-history/deps.nix | 237 ------------------------ 2 files changed, 7 insertions(+), 244 deletions(-) delete mode 100644 pkgs/shells/zsh/zsh-history/deps.nix diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 54a39209ca9c..6f461178a449 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -1,24 +1,24 @@ -{ lib, fetchFromGitHub, buildGoPackage, installShellFiles }: +{ lib, fetchFromGitHub, buildGoModule, installShellFiles }: -buildGoPackage rec { +buildGoModule rec { pname = "zsh-history"; - version = "2019-10-27"; + version = "2019-10-07"; src = fetchFromGitHub { owner = "b4b4r07"; repo = "history"; - rev = "527e6f51873992fbf9c1aad70aa3009a0027a8de"; - sha256 = "12dc380zfg3b9k7rcsyzi9dxqh28c4957b3fsx1nxvqvdm3ralm2"; + rev = "a08ad2dcffc852903ae54b0c5704b8a085009ef7"; + sha256 = "0r3p04my40dagsq1dssnk583qrlcps9f7ajp43z7mq73q3hrya5s"; }; nativeBuildInputs = [ installShellFiles ]; - goDeps = ./deps.nix; + modSha256 = "0f10b86gyn7m7lw43c8y1m30mdg0i092a319v3cb2qj05jb9vn42"; goPackagePath = "github.com/b4b4r07/history"; postInstall = '' install -d $out/share - cp -r $NIX_BUILD_TOP/go/src/${goPackagePath}/misc/* $out/share + cp -r "$NIX_BUILD_TOP/source/misc/"* "$out/share" installShellCompletion --zsh --name _history $out/share/zsh/completions/_history ''; diff --git a/pkgs/shells/zsh/zsh-history/deps.nix b/pkgs/shells/zsh/zsh-history/deps.nix deleted file mode 100644 index eeefe17b4b8c..000000000000 --- a/pkgs/shells/zsh/zsh-history/deps.nix +++ /dev/null @@ -1,237 +0,0 @@ -# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) -[ - { - goPackagePath = "github.com/BurntSushi/toml"; - fetch = { - type = "git"; - url = "https://github.com/BurntSushi/toml"; - rev = "a368813c5e648fee92e5f6c30e3944ff9d5e8895"; - sha256 = "1sjxs2lwc8jpln80s4rlzp7nprbcljhy5mz4rf9995gq93wqnym5"; - }; - } - { - goPackagePath = "github.com/Songmu/go-ltsv"; - fetch = { - type = "git"; - url = "https://github.com/Songmu/go-ltsv"; - rev = "fa2196a290e61d8689cd018048cbb6f14802782b"; - sha256 = "1mzkvw3510vska7qmcgxxz8qlkn9avw1apfxdncs9rqs9srgqm29"; - }; - } - { - goPackagePath = "github.com/b4b4r07/go-ask"; - fetch = { - type = "git"; - url = "https://github.com/b4b4r07/go-ask"; - rev = "d8472e72c0d0ac9e17d5d63080e6bf81687030a2"; - sha256 = "0762bybn7ii6aykycssdk1rkr2zmg8ijnkz94p330rfr27cnxyrx"; - }; - } - { - goPackagePath = "github.com/b4b4r07/go-colon"; - fetch = { - type = "git"; - url = "https://github.com/b4b4r07/go-colon"; - rev = "bc5ae99f1c2b6d202bd43ea8258596f0a09e7378"; - sha256 = "046xwvddj023j3xaq6g05xgzj9n13lmhbs5vddh68nyxnhbyrxqm"; - }; - } - { - goPackagePath = "github.com/b4b4r07/go-pathshorten"; - fetch = { - type = "git"; - url = "https://github.com/b4b4r07/go-pathshorten"; - rev = "b07af83744ea6f0a3abdd663f3f0c5e4457828ab"; - sha256 = "1ccljskb7x02lzy0sai9pyscdpkj4fj1bw82bjb3xicvhiafpvkh"; - }; - } - { - goPackagePath = "github.com/briandowns/spinner"; - fetch = { - type = "git"; - url = "https://github.com/briandowns/spinner"; - rev = "5b875a9171af19dbde37e70a8fcbe2ebd7285e05"; - sha256 = "0vq78qmg07dm9vnjqz17ca9qml8np7f9vj9igsira7a39xg09ivg"; - }; - } - { - goPackagePath = "github.com/dustin/go-humanize"; - fetch = { - type = "git"; - url = "https://github.com/dustin/go-humanize"; - rev = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e"; - sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3"; - }; - } - { - goPackagePath = "github.com/fatih/color"; - fetch = { - type = "git"; - url = "https://github.com/fatih/color"; - rev = "2d684516a8861da43017284349b7e303e809ac21"; - sha256 = "1fcfmz4wji3gqmmsdx493r7d101s58hwjalqps6hy25nva5pvmfs"; - }; - } - { - goPackagePath = "github.com/golang/protobuf"; - fetch = { - type = "git"; - url = "https://github.com/golang/protobuf"; - rev = "89a0c16f4dc2a70c0ed864d8ef64878f24fdaa51"; - sha256 = "0ik05qacl2alb673c7h6pn280j43y4wnv7j3lakp334zdp89npiy"; - }; - } - { - goPackagePath = "github.com/google/go-github"; - fetch = { - type = "git"; - url = "https://github.com/google/go-github"; - rev = "dae5b8767170392dd51fafc89da6605faa51a1c2"; - sha256 = "0hd1xpw12a1c406mya3c11i7zzwhx3w0wzkg7v9py437yf72m5id"; - }; - } - { - goPackagePath = "github.com/google/go-querystring"; - fetch = { - type = "git"; - url = "https://github.com/google/go-querystring"; - rev = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"; - sha256 = "0lkbm067nhmxk66pyjx59d77dbjjzwyi43gdvzyx2f8m1942rq7f"; - }; - } - { - goPackagePath = "github.com/inconshreveable/mousetrap"; - fetch = { - type = "git"; - url = "https://github.com/inconshreveable/mousetrap"; - rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"; - sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152"; - }; - } - { - goPackagePath = "github.com/kballard/go-shellquote"; - fetch = { - type = "git"; - url = "https://github.com/kballard/go-shellquote"; - rev = "95032a82bc518f77982ea72343cc1ade730072f0"; - sha256 = "1rspvmnsikdq95jmx3dykxd4k1rmgl98ryjrysvl0cf18hl1vq80"; - }; - } - { - goPackagePath = "github.com/mattn/go-colorable"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-colorable"; - rev = "efa589957cd060542a26d2dd7832fd6a6c6c3ade"; - sha256 = "0kshi4hvm0ayrsxqxy0599iv81kryhd2fn9lwjyczpj593cq069r"; - }; - } - { - goPackagePath = "github.com/mattn/go-isatty"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-isatty"; - rev = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"; - sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; - }; - } - { - goPackagePath = "github.com/mattn/go-pipeline"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-pipeline"; - rev = "cfb87a531e2beb376fe3ce94a6dfef7956d33bc7"; - sha256 = "1jkchwvcy6df8r9820ram8agw6qsvhv64a2k45lv5nldh6rz3vn0"; - }; - } - { - goPackagePath = "github.com/mattn/go-shellwords"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-shellwords"; - rev = "f8471b0a71ded0ab910825ee2cf230f25de000f1"; - sha256 = "023mdii306ff1h0n4cyylchsb5r2sdxl8x4a7dlbvry45daz2azb"; - }; - } - { - goPackagePath = "github.com/pelletier/go-buffruneio"; - fetch = { - type = "git"; - url = "https://github.com/pelletier/go-buffruneio"; - rev = "e2f66f8164ca709d4c21e815860afd2024e9b894"; - sha256 = "16h7fybbai45p5gn2la6z37a8h1ws6r3pg3nwqiw6gbbgjqicrbv"; - }; - } - { - goPackagePath = "github.com/pelletier/go-toml"; - fetch = { - type = "git"; - url = "https://github.com/pelletier/go-toml"; - rev = "c2dbbc24a97911339e01bda0b8cabdbd8f13b602"; - sha256 = "0v1dsqnk5zmn6ir8jgxijx14s47jvijlqfz3aq435snfrgybd5rz"; - }; - } - { - goPackagePath = "github.com/spf13/cobra"; - fetch = { - type = "git"; - url = "https://github.com/spf13/cobra"; - rev = "7c4570c3ebeb8129a1f7456d0908a8b676b6f9f1"; - sha256 = "16amh0prlzqrrbg5j629sg0f688nfzfgn9sair8jyybqampr3wc7"; - }; - } - { - goPackagePath = "github.com/spf13/pflag"; - fetch = { - type = "git"; - url = "https://github.com/spf13/pflag"; - rev = "9a97c102cda95a86cec2345a6f09f55a939babf5"; - sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2"; - }; - } - { - goPackagePath = "golang.org/x/crypto"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/crypto"; - rev = "de0752318171da717af4ce24d0a2e8626afaeb11"; - sha256 = "1ps1dl2a5lwr3vbwcy8n4i1v73m567y024sk961fk281phrzp13i"; - }; - } - { - goPackagePath = "golang.org/x/net"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/net"; - rev = "c39426892332e1bb5ec0a434a079bf82f5d30c54"; - sha256 = "1w26avkg623xilnwnad0cq6768cfbs4mxk875382xh0da6ai50s3"; - }; - } - { - goPackagePath = "golang.org/x/oauth2"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/oauth2"; - rev = "3d292e4d0cdc3a0113e6d207bb137145ef1de42f"; - sha256 = "0jvivlvx7snacd6abd1prqxa7h1z6b7s6mqahn8lpqlag3asryrl"; - }; - } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "98c5dad5d1a0e8a73845ecc8897d0bd56586511d"; - sha256 = "1jqajmnsp5a185a5gzfacnvdf5yid0ywi0bsia473h268z2rv8hs"; - }; - } - { - goPackagePath = "google.golang.org/appengine"; - fetch = { - type = "git"; - url = "https://github.com/golang/appengine"; - rev = "4216e58b9158e5f1c906f1aca75162a46a2ec88a"; - sha256 = "0mjg37cb6x3d85yi88sy20xa9czmzrfymfjg46b6ba6gr3rnlxi2"; - }; - } -] \ No newline at end of file From 5ddfcc1f60210872b7f2e6754e0ed89638bbf401 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Mon, 7 Oct 2019 21:02:56 +0200 Subject: [PATCH 7/8] Update pkgs/shells/zsh/zsh-history/default.nix Co-Authored-By: worldofpeace --- pkgs/shells/zsh/zsh-history/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 6f461178a449..047d4093396b 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -23,7 +23,7 @@ buildGoModule rec { ''; meta = with lib; { - description = "A CLI to provide enhanced history for your shell"; + description = "A CLI to provide enhanced history for your ZSH shell"; license = licenses.mit; homepage = https://github.com/b4b4r07/history; platforms = platforms.unix; From 0bfefb0913762fb1ebc8ed278b878e022948a7f3 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Tue, 15 Oct 2019 11:44:43 +0200 Subject: [PATCH 8/8] zsh-history: Backport upstream patch for config generation --- ...path-marshalling-when-saveing-config.patch | 25 +++++++++++++++++++ pkgs/shells/zsh/zsh-history/default.nix | 4 +++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/shells/zsh/zsh-history/0001-Fix-path-marshalling-when-saveing-config.patch diff --git a/pkgs/shells/zsh/zsh-history/0001-Fix-path-marshalling-when-saveing-config.patch b/pkgs/shells/zsh/zsh-history/0001-Fix-path-marshalling-when-saveing-config.patch new file mode 100644 index 000000000000..0c4fd22c54f5 --- /dev/null +++ b/pkgs/shells/zsh/zsh-history/0001-Fix-path-marshalling-when-saveing-config.patch @@ -0,0 +1,25 @@ +From efc16fbe7e41784f218d9c6cb4239b209cd77214 Mon Sep 17 00:00:00 2001 +From: Christian Kampka +Date: Sat, 12 Oct 2019 21:47:47 +0200 +Subject: [PATCH 1/2] Fix path marshalling when saveing config + +--- + config/config.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/config.go b/config/config.go +index 69a10c5..b5c61fe 100644 +--- a/config/config.go ++++ b/config/config.go +@@ -26,7 +26,7 @@ func (p *Path) UnmarshalText(text []byte) error { + return nil + } + +-func (p *Path) MarshalText() (text []byte, err error) { ++func (p Path) MarshalText() (text []byte, err error) { + return []byte(p.path), nil + } + +-- +2.19.2 + diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 047d4093396b..6bbcdac2c171 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -11,6 +11,10 @@ buildGoModule rec { sha256 = "0r3p04my40dagsq1dssnk583qrlcps9f7ajp43z7mq73q3hrya5s"; }; + patches = [ + ./0001-Fix-path-marshalling-when-saveing-config.patch + ]; + nativeBuildInputs = [ installShellFiles ]; modSha256 = "0f10b86gyn7m7lw43c8y1m30mdg0i092a319v3cb2qj05jb9vn42";