diff --git a/pkgs/tools/misc/gosu/default.nix b/pkgs/tools/misc/gosu/default.nix index d4c233007d26..0831649f6008 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="; - meta = { - description= "Tool that avoids TTY and signal-forwarding behavior of sudo and su"; + ldflags = [ "-d" "-s" "-w" ]; + + passthru.tests.version = testVersion { + package = gosu; + }; + + 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 9bdfa3923401..000000000000 --- 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"; - }; - } -]