From 4ff2e5d7e0c6337d46a1e089f9b653a19b9f7aa4 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Sun, 3 Jul 2022 22:29:30 +1000 Subject: [PATCH 1/2] restool: also depend on which The ls-main script uses `which`. It also has /bin/sh as its shebang, which means bash runs in Bourne-compatible mode and `which` is not a builtin. When the ls-* scripts are invoked from a user shell you don't notice the problem, because /run/current-system/sw/bin/which is on $PATH, but when they are invoked in a systemd service it would fail: .../bin/ls-addni: line 1054: which: command not found --- pkgs/os-specific/linux/restool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/restool/default.nix b/pkgs/os-specific/linux/restool/default.nix index 83c7c93ffcd8..9b8ade24748c 100644 --- a/pkgs/os-specific/linux/restool/default.nix +++ b/pkgs/os-specific/linux/restool/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused }: +{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused, which }: stdenv.mkDerivation rec { pname = "restool"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ file ]; - buildInputs = [ bash coreutils dtc gawk gnugrep gnused ]; + buildInputs = [ bash coreutils dtc gawk gnugrep gnused which ]; makeFlags = [ "prefix=$(out)" From 744f00c6b108794bef7b3887d45c52778f1eddcf Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Sat, 23 Jul 2022 10:01:27 +1000 Subject: [PATCH 2/2] =?UTF-8?q?restool:=2020.12=20=E2=86=92=202.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream appears to have changed their versioning scheme. Instead of being tied to LSDK date-based versions, restool is versioned independently. There are no tags or releases following the new versioning scheme, so update the package to take the most recent commit (27 Oct 2021). This also matches the revision that Fedora has packaged as version 2.4. --- pkgs/os-specific/linux/restool/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/restool/default.nix b/pkgs/os-specific/linux/restool/default.nix index 9b8ade24748c..add68522e7f9 100644 --- a/pkgs/os-specific/linux/restool/default.nix +++ b/pkgs/os-specific/linux/restool/default.nix @@ -1,20 +1,23 @@ -{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused, which }: +{ stdenv, lib, fetchgit, bash, coreutils, dtc, file, gawk, gnugrep, gnused, pandoc, which }: stdenv.mkDerivation rec { pname = "restool"; - version = "20.12"; + version = "2.4"; src = fetchgit { url = "https://source.codeaurora.org/external/qoriq/qoriq-components/restool"; - rev = "LSDK-${version}"; - sha256 = "137xvvms3n4wwb5v2sv70vsib52s3s314306qa0mqpgxf9fb19zl"; + rev = "abd2f5b7181db9d03db9e6ccda0194923b73e9a2"; + sha256 = "sha256-ryTDyqSy39e8Omf7l8lK4mLWr8jccDhMVPldkVGSQVo="; }; - nativeBuildInputs = [ file ]; + nativeBuildInputs = [ file pandoc ]; buildInputs = [ bash coreutils dtc gawk gnugrep gnused which ]; + enableParallelBuilding = true; makeFlags = [ - "prefix=$(out)" + "prefix=" + "bindir_completion=/share/bash-completion/completions" + "DESTDIR=$(out)" "VERSION=${version}" ];