1{ stdenvNoCC, lib, fetchFromGitHub, fuse-overlayfs, util-linux, makeWrapper }:
2stdenvNoCC.mkDerivation rec {
3 pname = "try";
4 version = "0.2.0";
5 src = fetchFromGitHub {
6 owner = "binpash";
7 repo = pname;
8 rev = "v${version}";
9 hash = "sha256-2EDRVwW4XzQhd7rAM2rDuR94Fkaq4pH5RTooFEBBh5g=";
10 };
11 nativeBuildInputs = [ makeWrapper ];
12 installPhase = ''
13 runHook preInstall
14 install -Dt $out/bin try
15 wrapProgram $out/bin/try --prefix PATH : ${lib.makeBinPath [ fuse-overlayfs util-linux ]}
16 runHook postInstall
17 '';
18 meta = with lib;{
19 homepage = "https://github.com/binpash/try";
20 description = "Lets you run a command and inspect its effects before changing your live system";
21 maintainers = with maintainers; [ pasqui23 ];
22 license = with licenses; [ mit ];
23 platforms = platforms.linux;
24 };
25}