-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease.nix
33 lines (28 loc) · 1.09 KB
/
release.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let
sources = import ./nix/sources.nix { };
pkgs = import sources.nixpkgs { };
oldPkgs = import sources.nixpkgs-2105 { };
default = pkgs.callPackage ./derivation.nix { };
inputs = pkgs.lib.cartesianProductOfSets {
stdenv = with pkgs;
map (overrideCC stdenv) [ gcc9 gcc10 gcc11 ]
++ map (overrideCC clangStdenv) [ clang_10 clang_11 clang_12 ];
boost = with pkgs; [ boost173 boost174 boost175 ];
poco = with pkgs; [
poco # this is 1.11.1 on the current nixpkgs pin
(pkgs.callPackage oldPkgs.poco.override { }) # 1.10.1 in nixos 21.05
];
};
toKeyValue = input@{ stdenv, boost, poco }:
let replDots = pkgs.lib.strings.replaceChars [ "." ] [ "_" ];
in
pkgs.lib.nameValuePair
# just dropping the dots from version numbers because nix uses dots
# to refer to describe paths into attribute trees
"${replDots stdenv.cc.cc.name}-poco-${replDots poco.version}-boost-${replDots boost.version}"
(default.override input);
in
{
inherit default;
variants = pkgs.recurseIntoAttrs (builtins.listToAttrs (builtins.map toKeyValue inputs));
}