Compare commits
12 Commits
512847a498
...
c2578d64b6
| Author | SHA1 | Date | |
|---|---|---|---|
| c2578d64b6 | |||
| bdb8b5ce38 | |||
| 082b82826e | |||
| 15695dc2cf | |||
| 8713d081fe | |||
| c678fa0007 | |||
| 180d416b9f | |||
| 19ad4ff56a | |||
| 4663dae31f | |||
| d60713ef9e | |||
| f15055ccdb | |||
| f836ffe7dc |
@ -35,35 +35,18 @@ let
|
|||||||
mpi = "2021.9.0";
|
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:
|
findMatch = name:
|
||||||
let
|
let
|
||||||
aptPackages = import aptPackageIndex;
|
aptPackages = builtins.fromJSON (builtins.readFile ./packages.json);
|
||||||
matches = lib.filter (x: name == x.Package) aptPackages;
|
matches = lib.filter (x: name == x.pname) aptPackages;
|
||||||
n = lib.length matches;
|
n = lib.length matches;
|
||||||
match = builtins.traceVerbose (name + " -- ${builtins.toString n}") (builtins.head matches);
|
match = builtins.traceVerbose (name + " -- ${builtins.toString n}") (builtins.head matches);
|
||||||
|
|
||||||
apthost = "https://apt.repos.intel.com/oneapi/";
|
apthost = "https://apt.repos.intel.com/oneapi/";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
url = apthost + match.Filename;
|
url = apthost + match.filename;
|
||||||
sha256 = match.SHA256;
|
sha256 = match.sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
uncompressDebs = debs: name: stdenv.mkDerivation {
|
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
File diff suppressed because one or more lines are too long
@ -11,7 +11,7 @@ def extract_fields: {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
# parses dependencies into a list of [{.pname, .kind, .version}]
|
# parses dependencies into a list of [{.pname, .kind, .version}]
|
||||||
# some dependencies do not have a version specified, in which case, version = version = null
|
# some dependencies do not have a version specified, in which case, kind = version = null
|
||||||
#
|
#
|
||||||
# example dependencies:
|
# example dependencies:
|
||||||
# intel-oneapi-common-vars (>= 2023.0.0-25325), intel-oneapi-common-licensing-2023.0.0
|
# intel-oneapi-common-vars (>= 2023.0.0-25325), intel-oneapi-common-licensing-2023.0.0
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-amd64/Packages -o amd64-packages
|
out_64=$(mktemp intel-api.64.XXXXXX)
|
||||||
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-all/Packages -o all-packages
|
out_all=$(mktemp intel-api.all.XXXXXX)
|
||||||
|
trap 'rm -f "$out_64" "$out_all"' EXIT INT HUP
|
||||||
|
|
||||||
cat amd64-packages all-packages | ./toJson.awk | ./process.jq >packages.json
|
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-amd64/Packages -o "$out_64"
|
||||||
|
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-all/Packages -o "$out_all"
|
||||||
|
|
||||||
|
# NOTE: we use `jq -r tostring` to minify the json (3.2Mb -> 2.3Mb)
|
||||||
|
cat "$out_64" "$out_all" | ./toJson.awk | ./process.jq | jq -r tostring >packages.json
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user