about summary refs log tree commit diff
path: root/pkgs/tools/misc/gosu
diff options
context:
space:
mode:
authorAaron Jheng <wentworth@outlook.com>2022-04-04 14:00:59 +0000
committerAaron Jheng <wentworth@outlook.com>2022-04-04 14:37:58 +0000
commitdaa65aca3aaadbb5e67de4ee5d0b73d22c02ab77 (patch)
treee0635206b743ab23a57c5159a4dc3d36adf987e7 /pkgs/tools/misc/gosu
parent1a069f4e72b179f07cef6178f85dfc15eed5e321 (diff)
gosu: unstable-2017-05-09 -> 1.4
Diffstat (limited to 'pkgs/tools/misc/gosu')
-rw-r--r--pkgs/tools/misc/gosu/default.nix25
-rw-r--r--pkgs/tools/misc/gosu/deps.nix11
2 files changed, 15 insertions, 21 deletions
diff --git a/pkgs/tools/misc/gosu/default.nix b/pkgs/tools/misc/gosu/default.nix
index d4c233007d26d..0831649f6008f 100644
--- a/pkgs/tools/misc/gosu/default.nix
+++ b/pkgs/tools/misc/gosu/default.nix
@@ -1,24 +1,29 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, testVersion, gosu }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "gosu";
-  version = "unstable-2017-05-09";
-
-  goPackagePath = "github.com/tianon/gosu";
+  version = "1.14";
 
   src = fetchFromGitHub {
     owner = "tianon";
     repo = "gosu";
-    rev = "e87cf95808a7b16208515c49012aa3410bc5bba8";
-    sha256 = "sha256-Ff0FXJg3z8akof+/St1JJu1OO1kS5gMtxSRnCLpj4eI=";
+    rev = version;
+    sha256 = "sha256-qwoHQB37tY8Pz8CHleYZI+SGkbHG7P/vgfXVMSyqi10=";
   };
 
-  goDeps = ./deps.nix;
+  vendorSha256 = "sha256-yxrOLCtSrY/a84N5yRWGUx1L425TckjvRyn/rtkzsRY=";
+
+  ldflags = [ "-d" "-s" "-w" ];
+
+  passthru.tests.version = testVersion {
+    package = gosu;
+  };
 
-  meta = {
-    description= "Tool that avoids TTY and signal-forwarding behavior of sudo and su";
+  meta = with lib; {
+    description = "Tool that avoids TTY and signal-forwarding behavior of sudo and su";
     homepage = "https://github.com/tianon/gosu";
     license = lib.licenses.gpl3;
+    maintainers = with maintainers; [ aaronjheng ];
     platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/tools/misc/gosu/deps.nix b/pkgs/tools/misc/gosu/deps.nix
deleted file mode 100644
index 9bdfa3923401f..0000000000000
--- a/pkgs/tools/misc/gosu/deps.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-[
-  {
-    goPackagePath = "github.com/opencontainers/runc";
-    fetch = {
-      type = "git";
-      url = "https://github.com/opencontainers/runc";
-      rev = "5274430fee9bc930598cfd9c9dbd33213f79f96e";
-      sha256 = "149057gm2y1mc45s7bh43c1ngjg1m54jkpaxw534ir9v5mb1zsxx";
-    };
-  }
-]