2022-07-18 16:21:45 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, python3
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-09-09 14:08:57 +00:00
|
|
|
pname = "bencodetools";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "unstable-2022-05-11";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "heikkiorsila";
|
|
|
|
repo = "bencodetools";
|
2022-07-18 16:21:45 +00:00
|
|
|
rev = "384d78d297a561dddbbd0f4632f0c74c0db41577";
|
|
|
|
sha256 = "1d699q9r33hkmmqkbh92ax54mcdf9smscmc0dza2gp4srkhr83qm";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-07-18 16:21:45 +00:00
|
|
|
patchShebangs configure
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace 'python_install_option=""' 'python_install_option="--prefix=$out"'
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# installCheck instead of check due to -install_name'd library on Darwin
|
|
|
|
doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
|
|
|
installCheckTarget = "check";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Collection of tools for manipulating bencoded data";
|
|
|
|
homepage = "https://gitlab.com/heikkiorsila/bencodetools";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "bencat";
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|