2019-12-21 16:36:16 +03:00
|
|
|
# SPDX-FileCopyrightText: 2019 Serokell <https://serokell.io>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
let
|
2023-02-06 16:21:17 +03:00
|
|
|
defaultNix = import ../default.nix;
|
|
|
|
in
|
2023-09-18 15:00:38 +03:00
|
|
|
{ pkgs ? defaultNix.legacyPackages }:
|
2023-02-06 16:21:17 +03:00
|
|
|
let
|
|
|
|
xrefcheck-x86_64-linux = defaultNix.packages.xrefcheck-static;
|
2020-04-11 13:22:26 +03:00
|
|
|
|
2023-02-06 16:21:17 +03:00
|
|
|
xrefcheck-x86_64-windows = defaultNix.packages.xrefcheck-windows;
|
2020-04-11 13:22:26 +03:00
|
|
|
|
|
|
|
mkZip = { name, paths, compression ? 5 }:
|
|
|
|
pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
buildInputs = [ pkgs.zip ];
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p "$out"
|
|
|
|
zip "$out/$name.zip" -jr ${toString paths} -${toString compression}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
xrefcheck-x86_64-windows-zip = mkZip {
|
|
|
|
name = "xrefcheck-x86_64-windows";
|
|
|
|
paths = [ "${xrefcheck-x86_64-windows}/bin" ];
|
|
|
|
};
|
2020-06-24 01:14:45 +03:00
|
|
|
|
|
|
|
in pkgs.linkFarm "xrefcheck-release" [
|
|
|
|
{
|
|
|
|
name = "xrefcheck-x86_64-linux";
|
2020-04-11 13:22:26 +03:00
|
|
|
path = "${xrefcheck-x86_64-linux}/bin/xrefcheck";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "xrefcheck-x86_64-windows.zip";
|
|
|
|
path = "${xrefcheck-x86_64-windows-zip}/xrefcheck-x86_64-windows.zip";
|
2020-06-24 01:14:45 +03:00
|
|
|
}
|
2019-12-21 16:36:16 +03:00
|
|
|
]
|