From 6c80f90e03d3f673fd4a64f10f88598d927ab5b6 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 16 Feb 2021 22:35:52 -0500 Subject: xtrt: init at unstable-2021-02-17 --- pkgs/tools/archivers/xtrt/default.nix | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/tools/archivers/xtrt/default.nix (limited to 'pkgs/tools/archivers') diff --git a/pkgs/tools/archivers/xtrt/default.nix b/pkgs/tools/archivers/xtrt/default.nix new file mode 100644 index 00000000000..175494057e0 --- /dev/null +++ b/pkgs/tools/archivers/xtrt/default.nix @@ -0,0 +1,36 @@ +{ bzip2, fetchFromGitHub, gzip, gnutar, lib, stdenv, unzip, xz }: + +stdenv.mkDerivation rec { + pname = "xtrt"; + version = "unstable-2021-02-17"; + + src = fetchFromGitHub { + owner = "figsoda"; + repo = pname; + rev = "61884fb7c48c7e1e2194afd82b85f415a6dc7c20"; + sha256 = "073l4q6mx5if791p5a6w8m8bz2aypmjmycaijq4spql8bh6h12vf"; + }; + + postPatch = '' + substituteInPlace xtrt \ + --replace "bzip2 " "${bzip2}/bin/bzip2 " \ + --replace "gzip " "${gzip}/bin/gzip " \ + --replace "tar " "${gnutar}/bin/tar " \ + --replace "unzip " "${unzip}/bin/unzip " \ + --replace "xz " "${xz}/bin/xz " + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp xtrt $out/bin + runHook postInstall + ''; + + meta = with lib; { + description = "Tiny script to extract archives by their extensions"; + homepage = "https://github.com/figsoda/xtrt"; + license = licenses.unlicense; + maintainers = with maintainers; [ figsoda ]; + }; +} -- cgit 1.4.1