diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix index 5532c3088e06..944df5c13d2c 100644 --- a/pkgs/development/tools/skopeo/default.nix +++ b/pkgs/development/tools/skopeo/default.nix @@ -12,7 +12,8 @@ , fuse-overlayfs }: -let +buildGoModule rec { + pname = "skopeo"; version = "0.2.0"; src = fetchFromGitHub { @@ -22,34 +23,22 @@ let sha256 = "09zqzrw6f1s6kaknnj3hra3xz4nq6y86vmw5vk8p4f6g7cwakg1x"; }; - defaultPolicyFile = runCommand "skopeo-default-policy.json" {} "cp ${src}/default-policy.json $out"; - - vendorPath = "github.com/containers/skopeo/vendor/github.com/containers/image/v5"; - -in -buildGoModule { - pname = "skopeo"; - inherit version; - inherit src; - outputs = [ "out" "man" ]; vendorSha256 = null; - excludedPackages = [ "integration" ]; - nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ]; buildInputs = [ gpgme ] ++ stdenv.lib.optionals stdenv.isLinux [ lvm2 btrfs-progs ]; - buildFlagsArray = '' - -ldflags= - -X ${vendorPath}/signature.systemDefaultPolicyPath=${defaultPolicyFile} - -X ${vendorPath}/internal/tmpdir.unixTempDirForBigFiles=/tmp + buildPhase = '' + patchShebangs . + make binary-local ''; - postBuild = '' + installPhase = '' + make install-binary PREFIX=$out make install-docs MANINSTALLDIR="$man/share/man" installShellCompletion --bash completions/bash/skopeo '';