nixpkgs/pkgs/applications/misc/pipr/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

35 lines
821 B
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, bubblewrap
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "pipr";
version = "0.0.16";
src = fetchFromGitHub {
owner = "ElKowar";
repo = pname;
rev = "v${version}";
sha256 = "sha256-6jtUNhib6iveuZ7qUKK7AllyMKFpZ8OUUaIieFqseY8=";
};
cargoSha256 = "sha256-SLOiX8z8LuQ9VA/lg0lOhqs85MGs0vmeP74cS6sgghI=";
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram "$out/bin/pipr" --prefix PATH : ${lib.makeBinPath [ bubblewrap ]}
'';
meta = with lib; {
description = "A commandline-tool to interactively write shell pipelines";
mainProgram = "pipr";
homepage = "https://github.com/ElKowar/pipr";
license = licenses.mit;
maintainers = with maintainers; [ elkowar ];
platforms = platforms.all;
};
}