2023-11-19 01:19:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-11-29 16:30:16 +00:00
|
|
|
, fetchFromGitHub
|
2020-11-13 15:25:01 +00:00
|
|
|
, python3
|
2023-11-29 16:30:16 +00:00
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, installShellFiles
|
|
|
|
, callPackage
|
2020-11-13 15:25:01 +00:00
|
|
|
}:
|
2014-11-15 09:57:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2023-11-29 16:30:16 +00:00
|
|
|
version = "1.6.2";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "pastebinit";
|
2014-04-03 14:39:46 +00:00
|
|
|
|
2023-11-29 16:30:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-vuAWkHlQM6QTWarThpSbY0qrxzej0GvLU0jT2JOS/qc=";
|
2014-04-03 14:39:46 +00:00
|
|
|
};
|
|
|
|
|
2023-11-29 16:30:16 +00:00
|
|
|
patches = [
|
|
|
|
./use-drv-etc.patch
|
2020-11-13 15:25:01 +00:00
|
|
|
];
|
|
|
|
|
2023-11-29 16:30:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
libxslt
|
|
|
|
installShellFiles
|
|
|
|
];
|
2020-11-13 15:25:01 +00:00
|
|
|
|
2023-11-29 16:30:16 +00:00
|
|
|
buildInputs = [
|
|
|
|
(python3.withPackages (p: [ p.distro ]))
|
2020-11-13 15:25:01 +00:00
|
|
|
];
|
2014-04-03 14:39:46 +00:00
|
|
|
|
2023-11-29 16:30:16 +00:00
|
|
|
buildPhase = ''
|
|
|
|
xsltproc --nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl pastebinit.xml
|
|
|
|
'';
|
|
|
|
|
2014-04-03 14:39:46 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/etc
|
|
|
|
cp -a pastebinit $out/bin
|
2023-11-29 16:30:16 +00:00
|
|
|
cp -a utils/* $out/bin
|
2014-04-03 14:39:46 +00:00
|
|
|
cp -a pastebin.d $out/etc
|
2023-11-29 16:30:16 +00:00
|
|
|
substituteInPlace $out/bin/pastebinit --subst-var-by "etc" "$out/etc"
|
|
|
|
installManPage pastebinit.1
|
2014-04-03 14:39:46 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-11-29 16:30:16 +00:00
|
|
|
homepage = "https://stgraber.org/category/pastebinit/";
|
2014-04-03 14:39:46 +00:00
|
|
|
description = "A software that lets you send anything you want directly to a pastebin from the command line";
|
2023-11-29 16:30:16 +00:00
|
|
|
maintainers = with maintainers; [ raboof samuel-martineau ];
|
2014-04-03 14:39:46 +00:00
|
|
|
license = licenses.gpl2;
|
2023-11-19 01:19:29 +00:00
|
|
|
platforms = platforms.linux ++ lib.platforms.darwin;
|
2014-04-03 14:39:46 +00:00
|
|
|
};
|
|
|
|
}
|