mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ screenshots ? true, video ? false, clipboard ? true
|
|
, lib, stdenv, jq, curl, fetchFromGitHub, makeWrapper, maim ? null, xclip ? null, capture ? null }:
|
|
|
|
assert screenshots -> maim != null;
|
|
assert video -> capture != null;
|
|
assert clipboard -> xclip != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pb_cli-unstable";
|
|
version = "2019-03-10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ptpb";
|
|
repo = "pb_cli";
|
|
rev = "6b9ce1ee45fe651d06d7c479a20026a173dd328b";
|
|
sha256 = "0w6a789zffvz4ixsb92q45n5s4xyx7s2l2f07972i3dajaaai8z7";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
liveDeps = [ jq curl ] ++ lib.optional screenshots maim
|
|
++ lib.optional video capture
|
|
++ lib.optional clipboard xclip;
|
|
|
|
installPhase = ''
|
|
install -Dm755 src/pb.sh $out/bin/pb
|
|
|
|
patchShebangs $out/bin/pb
|
|
wrapProgram $out/bin/pb \
|
|
--prefix PATH : '${lib.makeBinPath liveDeps}'
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "No bullshit 0x0.st client";
|
|
homepage = "https://github.com/ptpb/pb_cli";
|
|
maintainers = [ maintainers.ar1a ];
|
|
license = licenses.gpl3Plus;
|
|
mainProgram = "pb";
|
|
};
|
|
}
|