2022-07-23 02:01:27 +02:00
|
|
|
{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused, pandoc, which }:
|
2021-08-19 23:15:34 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "restool";
|
2022-07-23 02:01:27 +02:00
|
|
|
version = "2.4";
|
2021-08-19 23:15:34 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://source.codeaurora.org/external/qoriq/qoriq-components/restool";
|
2022-07-23 02:01:27 +02:00
|
|
|
rev = "abd2f5b7181db9d03db9e6ccda0194923b73e9a2";
|
|
|
|
sha256 = "sha256-ryTDyqSy39e8Omf7l8lK4mLWr8jccDhMVPldkVGSQVo=";
|
2021-08-19 23:15:34 +02:00
|
|
|
};
|
|
|
|
|
2022-07-23 02:01:27 +02:00
|
|
|
nativeBuildInputs = [ file pandoc ];
|
2022-07-03 14:29:30 +02:00
|
|
|
buildInputs = [ bash coreutils dtc gawk gnugrep gnused which ];
|
2021-08-19 23:15:34 +02:00
|
|
|
|
2022-07-23 02:01:27 +02:00
|
|
|
enableParallelBuilding = true;
|
2021-08-19 23:15:34 +02:00
|
|
|
makeFlags = [
|
2022-07-23 02:01:27 +02:00
|
|
|
"prefix="
|
|
|
|
"bindir_completion=/share/bash-completion/completions"
|
|
|
|
"DESTDIR=$(out)"
|
2021-08-19 23:15:34 +02:00
|
|
|
"VERSION=${version}"
|
|
|
|
];
|
|
|
|
|
2022-05-16 08:09:51 +02:00
|
|
|
postPatch = ''
|
|
|
|
# -Werror makes this derivation fragile on compiler version upgrades, patch
|
|
|
|
# it out.
|
|
|
|
sed -i /-Werror/d Makefile
|
|
|
|
'';
|
|
|
|
|
2021-08-19 23:15:34 +02:00
|
|
|
preFixup = ''
|
|
|
|
# wrapProgram interacts badly with the ls-main tool, which relies on the
|
|
|
|
# shell's $0 argument to figure out which operation to run (busybox-style
|
|
|
|
# symlinks). Instead, inject the environment directly into the shell
|
|
|
|
# scripts we need to wrap.
|
|
|
|
for tool in ls-append-dpl ls-debug ls-main; do
|
|
|
|
sed -i "1 a export PATH=\"$out/bin:${lib.makeBinPath buildInputs}:\$PATH\"" $out/bin/$tool
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "DPAA2 Resource Management Tool";
|
|
|
|
longDescription = ''
|
|
|
|
restool is a user space application providing the ability to dynamically
|
|
|
|
create and manage DPAA2 containers and objects from Linux.
|
|
|
|
'';
|
|
|
|
homepage = "https://source.codeaurora.org/external/qoriq/qoriq-components/restool/about/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|