xrefcheck/release/default.nix

38 lines
999 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2019 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
let
defaultNix = import ../default.nix;
in
{ pkgs ? defaultNix.legacyPackages }:
let
xrefcheck-x86_64-linux = defaultNix.packages.xrefcheck-static;
2020-04-11 13:22:26 +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" ];
};
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";
}
]