xrefcheck/release/default.nix
Roman Melnikov 8e4de7a50a
[Chore] Fix autoreleasing CI job
Problem: After a recent switch to GitHub Actions, job that creates
prerelease suddenly stopped working.

Solution: Switch to the autoreleasing script from serokell.nix
which uses 'gh' instead of 'hub'.
2023-09-22 16:00:31 +02:00

38 lines
999 B
Nix

# 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;
xrefcheck-x86_64-windows = defaultNix.packages.xrefcheck-windows;
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";
path = "${xrefcheck-x86_64-linux}/bin/xrefcheck";
}
{
name = "xrefcheck-x86_64-windows.zip";
path = "${xrefcheck-x86_64-windows-zip}/xrefcheck-x86_64-windows.zip";
}
]