2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2020-11-15 13:44:38 +00:00
|
|
|
, python3
|
2024-01-02 11:29:13 +00:00
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, installShellFiles
|
|
|
|
, callPackage
|
2020-11-15 13:44:38 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pastebinit";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-vuAWkHlQM6QTWarThpSbY0qrxzej0GvLU0jT2JOS/qc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./use-drv-etc.patch
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
libxslt
|
|
|
|
installShellFiles
|
|
|
|
];
|
2020-11-15 13:44:38 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildInputs = [
|
|
|
|
(python3.withPackages (p: [ p.distro ]))
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildPhase = ''
|
|
|
|
xsltproc --nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl pastebinit.xml
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/etc
|
|
|
|
cp -a pastebinit $out/bin
|
2024-01-02 11:29:13 +00:00
|
|
|
cp -a utils/* $out/bin
|
2020-04-24 23:36:52 +00:00
|
|
|
cp -a pastebin.d $out/etc
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace $out/bin/pastebinit --subst-var-by "etc" "$out/etc"
|
|
|
|
installManPage pastebinit.1
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://stgraber.org/category/pastebinit/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Software that lets you send anything you want directly to a pastebin from the command line";
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ raboof samuel-martineau ];
|
2024-05-15 15:35:15 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.linux ++ lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|