forked from rarias/bscpkgs
Simplify findMatch in intel-oneapi 2023
This should be a noop
This commit is contained in:
parent
1e7d43dacb
commit
87c1903778
@ -54,34 +54,24 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
aptPackages = import aptPackageIndex;
|
findMatch = name:
|
||||||
|
|
||||||
apthost = "https://apt.repos.intel.com/oneapi/";
|
|
||||||
|
|
||||||
getSum = pkgList: name:
|
|
||||||
let
|
let
|
||||||
matches = lib.filter (x: name == x.Package) pkgList;
|
aptPackages = import aptPackageIndex;
|
||||||
#n = lib.length matches;
|
matches = lib.filter (x: name == x.Package) aptPackages;
|
||||||
#match = builtins.trace (name + " -- ${builtins.toString n}") (lib.elemAt matches 0);
|
|
||||||
match = lib.elemAt matches 0;
|
|
||||||
in
|
|
||||||
match.SHA256;
|
|
||||||
|
|
||||||
getUrl = pkgList: name:
|
|
||||||
let
|
|
||||||
matches = lib.filter (x: name == x.Package) pkgList;
|
|
||||||
#match = assert lib.length matches == 1; lib.elemAt matches 0;
|
|
||||||
n = lib.length matches;
|
n = lib.length matches;
|
||||||
match =
|
match = builtins.traceVerbose (name + " -- ${builtins.toString n}") (builtins.head matches);
|
||||||
#builtins.trace (name + " -- n=${builtins.toString n}")
|
|
||||||
(lib.elemAt matches 0);
|
apthost = "https://apt.repos.intel.com/oneapi/";
|
||||||
in
|
in
|
||||||
apthost + match.Filename;
|
{
|
||||||
|
url = apthost + match.Filename;
|
||||||
|
sha256 = match.SHA256;
|
||||||
|
};
|
||||||
|
|
||||||
uncompressDebs = debs: name: stdenv.mkDerivation {
|
uncompressDebs = debs: name: stdenv.mkDerivation {
|
||||||
name = name;
|
name = name;
|
||||||
srcs = debs;
|
srcs = debs;
|
||||||
buildInputs = [ dpkg ];
|
nativeBuildInputs = [ dpkg ];
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
@ -94,10 +84,7 @@ let
|
|||||||
|
|
||||||
joinDebs = name: names:
|
joinDebs = name: names:
|
||||||
let
|
let
|
||||||
urls = builtins.map (x: getUrl aptPackages x) names;
|
debs = builtins.map (x: builtins.fetchurl (findMatch x)) names;
|
||||||
sums = builtins.map (x: getSum aptPackages x) names;
|
|
||||||
getsrc = url: sha256: builtins.fetchurl { inherit url sha256; };
|
|
||||||
debs = lib.zipListsWith getsrc urls sums;
|
|
||||||
in
|
in
|
||||||
uncompressDebs debs "${name}-source";
|
uncompressDebs debs "${name}-source";
|
||||||
|
|
||||||
@ -454,7 +441,7 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ifort-wrapper = wrapIntel rec {
|
ifort-wrapper = wrapIntel {
|
||||||
cc = intel-compiler-fortran;
|
cc = intel-compiler-fortran;
|
||||||
mygcc = gcc;
|
mygcc = gcc;
|
||||||
extraBuild = ''
|
extraBuild = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user