From 41098225dd67945ae907c726f6dd7fa0a35d0e67 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Sat, 28 May 2022 00:33:20 +0800 Subject: [PATCH] cshatag: 2019-12-03 -> 2.0 (#174927) Co-authored-by: Sandro --- pkgs/os-specific/linux/cshatag/default.nix | 21 +++++++++------------ pkgs/os-specific/linux/cshatag/deps.nix | 21 --------------------- 2 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 pkgs/os-specific/linux/cshatag/deps.nix diff --git a/pkgs/os-specific/linux/cshatag/default.nix b/pkgs/os-specific/linux/cshatag/default.nix index bc1b7f7ecf54..dc210b017a68 100644 --- a/pkgs/os-specific/linux/cshatag/default.nix +++ b/pkgs/os-specific/linux/cshatag/default.nix @@ -1,25 +1,23 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { +buildGoModule rec { pname = "cshatag"; - version = "2019-12-03"; - - goPackagePath = "github.com/rfjakob/cshatag"; - goDeps = ./deps.nix; + version = "2.0"; src = fetchFromGitHub { owner = "rfjakob"; repo = pname; - rev = "b169f0a9dd35a7381774eb176d4badf64d403560"; - sha256 = "16kam3w75avh8khkk6jfdnxwggz2pw6ccv6v7d064j0fbb9y8x0v"; + rev = "v${version}"; + sha256 = "sha256-jSRMNLS+JnA3coZf9zkOL/buxZubhbftXnxDJx0nwuU="; }; - makeFlags = [ "PREFIX=$(out)" "GITVERSION=${version}" ]; + vendorSha256 = "sha256-BX7jbYhs3+yeOUvPvz08aV2p14bXNGTag4QYkCHr5DQ="; + + ldflags = [ "-s" "-w" ]; postInstall = '' # Install man page - cd go/src/${goPackagePath} - make install $makeFlags + install -D -m755 -t $out/share/man/man1/ cshatag.1 ''; meta = with lib; { @@ -28,5 +26,4 @@ buildGoPackage rec { license = licenses.mit; platforms = platforms.linux; }; - } diff --git a/pkgs/os-specific/linux/cshatag/deps.nix b/pkgs/os-specific/linux/cshatag/deps.nix deleted file mode 100644 index 6daad9856782..000000000000 --- a/pkgs/os-specific/linux/cshatag/deps.nix +++ /dev/null @@ -1,21 +0,0 @@ -# This file was generated by https://github.com/kamilchm/go2nix v1.3.0 -[ - { - goPackagePath = "github.com/pkg/xattr"; - fetch = { - type = "git"; - url = "https://github.com/pkg/xattr"; - rev = "d304131d5e58ca76d8b31ceefbb0c85c7b2d2a36"; - sha256 = "0bxskiai283zfra13z5f7q7f77zz2cgswaj6l6jr2nwnc3l5m80i"; - }; - } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "201ba4db2418b54b698efb4d8082dcb504617cdb"; - sha256 = "1cqaiwp19kl38g4d6brfhi32822rhnh2q8x1j0i6yg7a8dzfvbz6"; - }; - } -]