diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-06-04 15:25:54 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-06-04 15:25:54 +0200 |
commit | 08900c0554657442c60c86e54081325c0f4cedce (patch) | |
tree | 4e7a2e330991ee3eb08cf6b51d3f44ae47ae03f3 /pkgs/applications/misc/dstask | |
parent | 458b2cb7d67561c796c6f0660a97eea9b685fc65 (diff) | |
parent | 3327b9a385f5ec2e219bf93b48896772b3f66afc (diff) | |
download | nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar.gz nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar.bz2 nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar.lz nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar.xz nixlib-08900c0554657442c60c86e54081325c0f4cedce.tar.zst nixlib-08900c0554657442c60c86e54081325c0f4cedce.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/misc/dstask')
-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 000000000000..fae7809d25a2 --- /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; + }; +} |