Use packages.json for intel packages instead of awk script
This commit is contained in:
parent
1430ae7ceb
commit
3ed5463c25
@ -35,35 +35,18 @@ let
|
||||
mpi = "2021.9.0";
|
||||
};
|
||||
|
||||
aptPackageIndex = stdenv.mkDerivation {
|
||||
name = "intel-oneapi-packages";
|
||||
srcs = [
|
||||
# Run update.sh to update the package lists
|
||||
./amd64-packages ./all-packages
|
||||
];
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
awk -F': ' '\
|
||||
BEGIN { print "[ {" } \
|
||||
NF==0 { empty=1; } \
|
||||
NF && empty { print "} {"; empty=0; } \
|
||||
/: / { printf "%s = \"%s\";\n", $1, $2 } \
|
||||
END { print "} ]" }' $srcs > $out
|
||||
'';
|
||||
};
|
||||
|
||||
findMatch = name:
|
||||
let
|
||||
aptPackages = import aptPackageIndex;
|
||||
matches = lib.filter (x: name == x.Package) aptPackages;
|
||||
aptPackages = builtins.fromJSON (builtins.readFile ./packages.json);
|
||||
matches = lib.filter (x: name == x.pname) aptPackages;
|
||||
n = lib.length matches;
|
||||
match = builtins.traceVerbose (name + " -- ${builtins.toString n}") (builtins.head matches);
|
||||
|
||||
apthost = "https://apt.repos.intel.com/oneapi/";
|
||||
in
|
||||
{
|
||||
url = apthost + match.Filename;
|
||||
sha256 = match.SHA256;
|
||||
url = apthost + match.filename;
|
||||
sha256 = match.sha256;
|
||||
};
|
||||
|
||||
uncompressDebs = debs: name: stdenv.mkDerivation {
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user