From 1fedcb8f9cd2c8880d28453f554ea2b0fc937cd7 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 19 Aug 2021 23:15:34 +0200 Subject: [PATCH] restool: init at 20.12 --- pkgs/os-specific/linux/restool/default.nix | 42 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/os-specific/linux/restool/default.nix diff --git a/pkgs/os-specific/linux/restool/default.nix b/pkgs/os-specific/linux/restool/default.nix new file mode 100644 index 00000000000..4f488c28323 --- /dev/null +++ b/pkgs/os-specific/linux/restool/default.nix @@ -0,0 +1,42 @@ +{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused }: + +stdenv.mkDerivation rec { + pname = "restool"; + version = "20.12"; + + src = fetchgit { + url = "https://source.codeaurora.org/external/qoriq/qoriq-components/restool"; + rev = "LSDK-${version}"; + sha256 = "137xvvms3n4wwb5v2sv70vsib52s3s314306qa0mqpgxf9fb19zl"; + }; + + nativeBuildInputs = [ file ]; + buildInputs = [ bash coreutils dtc gawk gnugrep gnused ]; + + makeFlags = [ + "prefix=$(out)" + "VERSION=${version}" + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 01825404430..f841ec98336 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8549,6 +8549,8 @@ with pkgs; inherit (callPackage ../development/misc/resholve { }) resholve resholvePackage; + restool = callPackage ../os-specific/linux/restool {}; + reuse = callPackage ../tools/package-management/reuse { }; rewritefs = callPackage ../os-specific/linux/rewritefs { };