diff options
author | Timo Kaufmann <timokau@zoho.com> | 2020-05-30 11:48:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-30 11:48:07 +0000 |
commit | 69ea180bc9fed4e391f7d31d3fc135991d066c4e (patch) | |
tree | 308bf421d9c4b9ef29c80709cc168954058c63a2 /pkgs/applications | |
parent | a7b2e19215ca1a7f12571d0eef4677f9cefa7aed (diff) | |
parent | 036eb89f1658ec43461f22230dd760fc928a1085 (diff) |
Merge pull request #87383 from stianlagstad/sl/dstask-0.17
dstask: init at 0.18
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/misc/dstask/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/misc/dstask/default.nix b/pkgs/applications/misc/dstask/default.nix new file mode 100644 index 0000000000000..fae7809d25a2e --- /dev/null +++ b/pkgs/applications/misc/dstask/default.nix @@ -0,0 +1,40 @@ +{ stdenv, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "dstask"; + version = "0.18"; + + src = fetchFromGitHub { + owner = "naggie"; + repo = pname; + rev = "v${version}"; + sha256 = "16z5zlfj955pzsj0l58835slvpchdaq2vbyx2fjzi6y9xn1z2nd1"; + }; + + # Set vendorSha256 to null because dstask vendors its dependencies (meaning + # that third party dependencies are stored in the repository). + # + # Ref <https://github.com/NixOS/nixpkgs/pull/87383#issuecomment-633204382> + # and <https://github.com/NixOS/nixpkgs/blob/d4226e3a4b5fcf988027147164e86665d382bbfa/pkgs/development/go-modules/generic/default.nix#L18> + vendorSha256 = null; + + # The ldflags reduce the executable size by stripping some debug stuff. + # The other variables are set so that the output of dstask version shows the + # git ref and the release version from github. + # Ref <https://github.com/NixOS/nixpkgs/pull/87383#discussion_r432097657> + buildFlagsArray = [ '' + -ldflags=-w -s + -X "github.com/naggie/dstask.VERSION=${version}" + -X "github.com/naggie/dstask.GIT_COMMIT=v${version}" + '' ]; + + subPackages = [ "cmd/dstask.go" ]; + + meta = with stdenv.lib; { + description = "Command line todo list with super-reliable git sync"; + homepage = src.meta.homepage; + license = licenses.mit; + maintainers = with maintainers; [ stianlagstad foxit64 ]; + platforms = platforms.linux; + }; +} |