2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2020-06-02 18:00:15 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "dstask";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.26";
|
2020-06-02 18:00:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "naggie";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-xZFQQDK+yGAv4IbuNe2dvNa3GDASeJY2mOYw94goAIM=";
|
2020-06-02 18:00:15 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Set vendorHash to null because dstask vendors its dependencies (meaning
|
2020-06-02 18:00:15 +00:00
|
|
|
# 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>
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = null;
|
2020-06-02 18:00:15 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
# 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>
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-w" "-s"
|
|
|
|
"-X github.com/naggie/dstask.VERSION=${version}"
|
|
|
|
"-X github.com/naggie/dstask.GIT_COMMIT=v${version}"
|
|
|
|
];
|
2020-06-02 18:00:15 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-02 18:00:15 +00:00
|
|
|
description = "Command line todo list with super-reliable git sync";
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.mit;
|
2021-07-16 19:40:57 +00:00
|
|
|
maintainers = with maintainers; [ stianlagstad ];
|
2020-06-02 18:00:15 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|