Commit 99bdbeb2 authored by emaryn's avatar emaryn
Browse files

dell-command-configure: 4.11.0-6 -> 5.1.0-6

parent c4170d9f
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  stdenv,
  fetchurl,
  dpkg,
  autoPatchelfHook,
@@ -17,20 +17,20 @@
# the dependencies from other pkgs.

let
  version = "4.11.0-6";
  version = "5.1.0-6";

  unpacked = stdenv.mkDerivation rec {
  unpacked = stdenv.mkDerivation (finalAttrs: {
    inherit version;
    pname = "dell-command-configure-unpacked";

    src = fetchurl {
      urls = [
        "https://dl.dell.com/FOLDER10469726M/1/command-configure_${version}.ubuntu22_amd64.tar.gz"
        "https://web.archive.org/web/20240228233129/https://dl.dell.com/FOLDER10469726M/1/command-configure_4.11.0-6.ubuntu22_amd64.tar.gz"
        "https://dl.dell.com/FOLDER12705845M/1/command-configure_${version}.ubuntu24_amd64.tar.gz"
        "https://web.archive.org/web/20250421172156/https://dl.dell.com/FOLDER12705845M/1/command-configure_5.1.0-6.ubuntu24_amd64.tar.gz"
      ];
      # The CDN blocks the Curl user-agent, so set to blank instead.
      curlOpts = ''-A=""'';
      hash = "sha256-Bwa4sYguYwEBKEJSP3wzHhzjuDeaGQN8fKeooWHX18E=";
      hash = "sha256-MM6Djkz/VuVCLHGEji88Xq0vIV+AfqQkjNXz4zqFOtw=";
    };

    dontBuild = true;
@@ -38,8 +38,8 @@ let
    nativeBuildInputs = [ dpkg ];

    unpackPhase = ''
      tar -xzf ${src}
      dpkg-deb -x command-configure_${version}.ubuntu22_amd64.deb command-configure
      tar -xzf ${finalAttrs.src}
      dpkg-deb -x command-configure_${version}.ubuntu24_amd64.deb command-configure
      dpkg-deb -x srvadmin-hapi_9.5.0_amd64.deb srvadmin-hapi
    '';

@@ -47,7 +47,7 @@ let
      mkdir $out
      cp -r . $out
    '';
  };
  });

  # Contains a fopen() wrapper for finding the firmware package
  wrapperLibName = "wrapper-lib.so";
@@ -74,16 +74,20 @@ stdenv.mkDerivation {
  inherit version;
  pname = "dell-command-configure";

  nativeBuildInputs = [ autoPatchelfHook ];

  buildInputs = [
    openssl
    (lib.getLib stdenv.cc.cc)
  ];
  nativeBuildInputs = [ autoPatchelfHook ];

  dontConfigure = true;

  src = unpacked;

  installPhase = ''
    runHook preInstall

    install -D -t $out/lib -m644 -v command-configure/opt/dell/dcc/libhapiintf.so
    install -D -t $out/lib -m644 -v command-configure/opt/dell/dcc/libsmbios_c.so.2
    install -D -t $out/bin -m755 -v command-configure/opt/dell/dcc/cctk
@@ -91,6 +95,8 @@ stdenv.mkDerivation {
    for lib in $(find srvadmin-hapi/opt/dell/srvadmin/lib64 -type l); do
        install -D -t $out/lib -m644 -v $lib
    done

    runHook postInstall
  '';

  postFixup = ''
@@ -104,11 +110,11 @@ stdenv.mkDerivation {
      $out/lib/*
  '';

  meta = with lib; {
  meta = {
    description = "Configure BIOS settings on Dell laptops";
    homepage = "https://www.dell.com/support/article/us/en/19/sln311302/dell-command-configure";
    license = licenses.unfree;
    maintainers = with maintainers; [ ryangibb ];
    license = lib.licenses.unfree;
    maintainers = with lib.maintainers; [ ryangibb ];
    platforms = [ "x86_64-linux" ];
    sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
  };