Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb committed Oct 13, 2023
1 parent aaec1cd commit 24e6d08
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions pkgs/tools/system/dell-command-configure/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
"https://dl.dell.com/FOLDER08911312M/1/command-configure_${version}.ubuntu20_amd64.tar.gz";
# The CDN blocks the Curl user-agent, so set to blank instead.
curlOpts = ''-A=""'';
sha256 = "sha256-l5oHgDkFBF6llNsHufTmuDzjkhGmXHYXlOJ4hvZfRoE=";
hash = "sha256-l5oHgDkFBF6llNsHufTmuDzjkhGmXHYXlOJ4hvZfRoE=";
};

dontBuild = true;
Expand All @@ -42,12 +42,10 @@ let
'';

installPhase = ''
mkdir $out
cp -r . $out
install -D . -t $out
'';
};


# Contains a fopen() wrapper for finding the firmware package
wrapperLibName = "wrapper-lib.so";
wrapperLib = stdenv.mkDerivation {
Expand All @@ -57,8 +55,8 @@ let
src = ./.;

dontUnpack = true;
buildPhase = ''
substitute ${./wrapper-lib.c} lib.c \
ppstPatch = ''
substitute wrapper-lib.c lib.c \
--subst-var-by to "${unpacked}/srvadmin-hapi/opt/dell/srvadmin/etc/omreg.d/omreg-hapi.cfg"
cc -fPIC -shared lib.c -o ${wrapperLibName}
'';
Expand All @@ -79,13 +77,12 @@ in stdenv.mkDerivation rec {
src = unpacked;

installPhase = ''
mkdir -p $out/bin $out/lib
install -t $out/lib -m644 -v command-configure/opt/dell/dcc/libhapiintf.so
install -t $out/lib -m644 -v command-configure/opt/dell/dcc/libsmbios_c.so.2
install -t $out/bin -m755 -v command-configure/opt/dell/dcc/cctk
install -t $out/bin -m755 -v srvadmin-hapi/opt/dell/srvadmin/sbin/dchcfg
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
install -D -t $out/bin -m755 -v srvadmin-hapi/opt/dell/srvadmin/sbin/dchcfg
for lib in $(find srvadmin-hapi/opt/dell/srvadmin/lib64 -type l); do
install -t $out/lib -m644 -v $lib
install -D -t $out/lib -m644 -v $lib
done
'';

Expand Down

0 comments on commit 24e6d08

Please sign in to comment.